Servlet生命周期

1,客户端发送请求=======》servlet

2,根据用户的请求查询对应的servlet(如果有就直接使用,没有就创建)

3,加载servlet到内存中

4,servlet实例化=====》调用init()初始化servlet

5,根据用户的请求方式,service()来派发到不同的方法处理(doget(),dePost())

6,服务器关闭,执行destroy()销毁servlet

原文地址:https://www.cnblogs.com/liuyunfei/p/7114821.html