servlet

1、servlet实现的三种方式

a.实现Servlet接口

b.继承GenericServlet类

c.继承HttpServlet类

2、servlet生命周期init、destroy方法只能调用一次,service可以多次;init方法,初始化servlet类似于构造器;destroy方法 reload 应用时或者关闭Tomcat时

 

posted @ 2018-01-06 21:11  think的海角  阅读(102)  评论(0编辑  收藏  举报