Listeners are new feature in the Sun
Microsystems Java™ Servlet 2.3 Specification. A listener can be used to monitor and
react to events in a servlet's life-cycle by defining methods that get
invoked when life-cycle events occur. Support for application level
events is defined in the Java Servlet Specification 2.3.
Application event listeners are classes that
implement one or more of the servlet event listener interfaces. Servlet
event listeners support notification for state changes in the
ServletContext and
HttpSession objects, specifically:
- Servlet context listeners are used to manage resources or state held at a VM
level for the application.
- HTTP session listeners are used to manage state or resources associated with a
series of requests made in a Web application from the same client or
user.
For more information about listeners, refer to the Sun Microsystems Java Servlet
2.3 Specification at java.sun.com/products/servlet/download.html.