servlet一般用来控制结构的
里面也一般只包含少量的html代码,至于怎么用?建议你先在这个论坛中搜一下,你会有很多收获的

解决方案 »

  1.   

    我也用jsp不过servlet用的很少,你的问题也是我要问的
      

  2.   

    !
    偶的理解是servlet可以省了set()get()一堆方法
    控制session也比较方便,不过感觉还是用bean结构清晰一点!
      

  3.   

    give more consideration on the front controller of servlet.
    Don't combine the html code into the servlet.It would beat u after 5 minutest caze the mass code crowd together.For example.
    When u click the submit button in the html page, where is the destination? how to access to the business logic?It should and must depend entirely on the servlet.
    Inside the servlet,we delegate the request to the data access object which operate to the database.Obviously,u can use hibernate,or JDBC+DAO to access database or ldap and any data storage.In the presentaion layer,we can use JSP ,taglib to illustrate all of the data.
      

  4.   

    招聘网页编程人员(1-2名)
    1-2年的网页编程经验
    语言:JSP,java,html,javascript
    请在简历中写明对以上语言的掌握程度以及学历.北京友联创新系统集成有限公司
    联系方式:北京82899479-8010王先生
    [email protected]
      

  5.   

    找找mvc模式的model2方面的资料吧
      

  6.   

    我搜索了一下,又看到需要在web.xml里面加上
        <servlet>
        <servlet-name>Hello</servlet-name>
        <servlet-class>Hello</servlet-class>
      </servlet>
      <servlet-mapping>
        <servlet-name>Hello</servlet-name>
        <url-pattern>/Servlet/Hello</url-pattern>
      </servlet-mapping>
    这么一段代码,但还是不行。先不管servlet如何用,现在急需怎么把第一个servlet运行出来