Listeners

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:

For more information about listeners, refer to the Sun Microsystems Java Servlet 2.3 Specification at java.sun.com/products/servlet/download.html.

Related concepts
Servlets
Listeners
Web application overview
Related tasks
Creating Servlets
Creating Listeners
Creating Filters