Overview | Package | Class | Tree | Deprecated | Index | Help
| Servlet 3.0 - Apache Tomcat 7.0.29
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

## javax.servlet.annotation
Annotation Type WebListener

    @Target(value=TYPE)
    @Retention(value=RUNTIME)
    @Documented
    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 {`

Since:
  Servlet 3.0

Optional Element Summary
`java.lang.String` | `value`

### value

    public abstract java.lang.String value

  Returns:
    description of the listener, if present
  Default:
    ""

Overview | Package | Class | Tree | Deprecated | Index | Help
| Servlet 3.0 - Apache Tomcat 7.0.29
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT

Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.