Please enable JavaScript.
Coggle requires JavaScript to display documents.
Listeners (ServletContextAttributeListener (Listener interface…
Listeners
ServletContextAttributeListener
Listener interface
attributeAdded
attributeRemoved
attributeReplaced
Event Type
ServletContextAttributeEvent
Scenario
Want to know if an attribute in a web app context has been added, removed or replaced
ServletContextListener
Listener interface
contextCreated
contextDestroyed
Event Type
ServletContextEvent
Scenario
Want to know when a context is created (app deployed) or destroyed (app undeployed)
HttpServletRequestListener
Listener interface
requestInitialized
requestDestroyed
Event type
ServletRequestEvent
Scenario
Want to know each time a request comes in so you may want to log it
ServletRequestAttributeListener
Listener interface
attributeRemoved
attributeReplaced
attributeAdded
Event type
ServletRequestAttributeEvent
Scenario
Want to know when a servlet request attribute has been added, removed or replaced
HttpSessionListener
Listener interface
sessionCreated
sessionDestroyed
Event type
HttpSessionEvent
Scenario
track active sessions
HttpSessionBinderInterface
Listener interface
valueBound
valueUnbound
Event type
HttpSessionBindingEvent
Scenario
objects stored as attributes, you want to be notified when they are bound or removed from session
HttpSessionAttributeListener
Listener interface
attributeAdded
attributeRemoved
attributeReplaced
Event type
HttpSessionBindingEvent
Scenario
Want to know when a session attribute has been added, removed or replaced
HttpSessionActivationListener
Listener interface
sessionDidActivate
sessionWillPassivate
Event type
HttpSessionEvent
Scenario
You have an attribute class, and you want objects of this type to be notified when the session to which they’re bound is migrating to and from another JVM