sevlet学习摘要 09 December 2009 20:53 Wednesday by 小屋 浏览(2184)

1.    Servlet
2.    什么是servlet:在web容器中运行的服务器端JAVA程序,主要用于响应HTTP请求。Servlet一般用于MVC中的控制器部分。
3.    什么是servlet容器:用来管理servlet生命周期的应用程序如(tomcat)。
4.    servlet构架:
public class servlet extendsHttpServlet{
    public void init() throws ServletException {}//初始化
    public void doGet(HttpServletRequest request,HttpServletResponse response)throws IOException,ServletException{}//doget
public void doPost(HttpServletRequest request,HttpServletResponse response)throws IOException,ServletException{}//dopost
public void destroy() {}//销毁servlet对象
}

阅读全文>>