SERVLET3.0 has (but is not limited to) the following interfaces:
1, Servletcontextlistener
This interface is used to listen for startup and shutdown events for Web application.
2, Servletcontextattributelistener
This interface is used to listen for property (attribute) change events on ServletContext objects. This is the property Change event on application.
3, Servletrequestlistener
This interface is used to listen for client initiated requests (request) events.
4, Servletrequestattributelistener
This interface is used to listen for property (attribute) change events on ServletRequest objects.
5, Httpsessionlistener
This interface is used to listen for the start and end events of the session with the client.
6, Httpsessionattributelistener
This interface is used to listen for property (attribute) Change events on the Session object.
To say more, @WebListener this annotation is a feature of the Servlet3.0, this annotation is equivalent to the previous configuration in the Web. xml file:
<listener> <listener-class>com.abc.servlet3.ServletContextEventHandler</listener-class> </ Listener>
The Com.abc.servlet3.ServletContextEventHandler in the above configuration is my fiction, in short, your implementation of the Xxxxxxlistener class. By writing @weblistener annotation on your implementation class, you can omit the configuration of listener information in Web. Xml.
This article is from the "Bitterjava" blog, make sure to keep this source http://rickqin.blog.51cto.com/1096449/1697499
6 interface functions of the Servlet3.0