Servlet处理的流程
1. 客户端使用浏览器提交对Servlet的调用的Get或者Post请求
2.服务器接到请求后,如果该Servlet是第一次被调用,实例化这个Servlet
3.服务器调用该Servlet对象的service()方法
4.Servlet产生动态的回复内容
5.服务器发送回复内容给客户端的浏览器
Servlet的生命周期
init()方法
service()方法
destroy()方法
1.Load servlet class.
2.Create servlet instance.
3.Call the init method. (只初始化一次init()方法)
4.Call the service method.
5.Call the destroy method.