Monday, July 9, 2018

Event and Listener in Servlet

Servlet Listener is used for listening to events in a web containers, such as when you create a session, or place an attribute in an session or if you passivate and activate in another container, to subscribe to these events you can configure listener in web.xml.

Event classes
  1. ServletRequestEvent
  2. ServletContextEvent
  3. ServletRequestAttributeEvent
  4. ServletContextAttributeEvent
  5. HttpSessionEvent
  6. HttpSessionBindingEvent
Event interfaces
  1. ServletRequestListener
  2. ServletContextListener
  3. ServletRequestAttributeListener
  4. ServletContextAttributeListener
  5. HttpSessionListener
  6. HttpSessionBindingListener
  7. HttpSessionAttributeListener
  8. HttpSessionActivationListener 

No comments:

Post a Comment