Annotation Type WebListener

public @interface WebListener

The annotation used to declare a listener for various types of event, in a given web application context.

The class annotated MUST implement one, (or more), of the following interfaces: HttpSessionAttributeListener, HttpSessionListener, ServletContextAttributeListener, ServletContextListener, ServletRequestAttributeListener, ServletRequestListener

E.g. @WebListener
public TestListener implements ServletContextListener {

Servlet 3.0

Optional Element Summary
 String value


public abstract String value
description of the listener, if present

(Built by coreservlets)

As of July 2010, there were no online versions of the servlet 3.0, JSP 2.2, and EL 2.2 Javadocs, except as part of the huge Java EE 6 API. So, I built them myself from the Tomcat 7 source code.

Java EE TutorialsJava EE Training