![]() |
![]() |
||||
At line 5 changed 1 line. |
Listeners can either be [SessionListeners|SessionListener], [ContextListeners|ContextListener], or both. This is defined by which interface(s) they implement. |
A listener is notified about various events, such as application or session events. |
At line 7 changed 3 lines. |
!More Information |
*[SessionListener|SessionListener] |
*[ContextListener|ContextListener] |
All listeners are defined the same way. Their function depends on which interface(s) they implement. |
!Example code demonstrating the <[listener|web.xml.Listener]> and <[listener-class|web.xml.ListenerClass]> elements: |
* [Context Listener] example, to listen for application create/destroy events |
* [Session Listener] example, to listen for session create/destroy events |
* [Session Attribute Listener] example, to listen for changes to session attributes |
!See Also |
* <[listener-class|web.xml.ListenerClass]> subelement |