Servlet 的生命周期
来源:互联网 发布:淘宝商城的收费标准 编辑:程序博客网 时间:2024/04/20 04:22
Servlet 的生命周期分为init, service, and destroy.三部分。The init( ) MethodThe init method is called by the servlet container after the servlet class has been instantiated. The servlet container calls this method exactly once to indicate to the servlet that the servlet is being placed into service. The init method must complete successfully before the servlet can receive any requests.You can override this method to write initialization code that needs to run only once, such as loading a database driver, initializing values, and so on. In other cases, you normally leave this method blank.The signature of this method is as follows:public void init(ServletConfig config) throws ServletExceptionThe service( ) MethodThe service method is called by the servlet container after the servlet's init method to allow the servlet to respond to a request.This method has the following signature:public void service(ServletRequest request, ServletResponse response) throws ServletException, java.io.IOExceptionThe destroy( ) MethodThe servlet container calls the destroy method before removing a servlet instance from service. This normally happens when the servlet container is shut down or the servlet container needs some free memory.public void destroy()
- [Servlet]Servlet的生命周期
- 【Servlet】Servlet的生命周期
- Servlet详解---Servlet的生命周期
- Servlet入门----Servlet的生命周期
- Servlet的生命周期
- Servlet 的生命周期
- Servlet的生命周期
- 关于Servlet的生命周期
- [转]servlet的生命周期
- servlet的生命周期
- servlet的生命周期
- Servlet的生命周期
- Servlet的生命周期
- servlet的生命周期
- Servlet的生命周期
- servlet 的生命周期
- Servlet的生命周期
- Servlet的生命周期【转】
- 李开复致大学生的第7封信
- 李开复致大学生的第8封信
- 防止ASP木马在服务器上运行
- Windows2000安全检查清单
- regsvr32 的用法
- Servlet 的生命周期
- memory alignment
- 编程修养
- 掉牙
- 关于查杀win32.parite.a病毒
- 用递归程序来实现1D-FFT
- RedHat EL ES3 2.4.21-9上装oracle 9.2.0.4笔记
- DOS命令全集
- 做一个传统的自己