What is Event
Changing the state of an object is known as an event.We can perform some important tasks at the occurrence of these exceptions, such as counting total and current logged-in users, creating tables of the database at time of deploying the project, creating database connection object etc.
Event Types
- ServletRequestEvent – ServletRequestListener
- ServletContextEvent – ServletContextListener
- ServletRequestAttributeEvent – ServletRequestAttributeEvent
- ServletContextAttributeEvent – ServletContextAttributeListener
- HttpSessionEvent – HttpSessionListener
- HttpSessionBindingEvent – HttpSessionAttributeListener
Listener Types