这么快就结束了?
根据 Servlet API Specification, version 2.3,它定义了 Application Events
Tomcat 4.0 将实现这个功能,以下摘自 4.0 的 README.
http://jakarta.apache.org/cvsweb/index.cgi/jakarta-tomcat-4.0/NEW_SPECS.txt?rev=1.7&content-type=text/vnd.viewcvs-markup
Application Events [Medium Well]
--------------------------------
You can now register event listeners in the web.xml file that receive
notification when the following events occur:
- Application startup
- Application shutdown
- New, replaced, or removed application (servlet context) attributes
- Session created
- Session invalidated or timed out
- New, replaced, or removed session attributes
Application listener functionality has been added to Catalina, and seems to
work fairly well. There are two listeners in the "examples" web application
that simply log things with ServletContext.log() to show that they were reached.