Event: Event is an entity, that notifies someone (listener) when something happens. There are few kinds of events: ServletContextEvent (notifies when the webapp is initialized / when the servlet Context is made) ServletRequestEvent (notifies the listener each time the request comes) Listener: Listener is an entity that is notified each time an event occurs. It is like a piece of code which runs when an event happens. In other words, when we need to associate some part of code to some event, and we want that code to run only when that specific event occurs, then we use event listeners. Types: Few event listeners are mentioned below: ServletContextListener ( Initializes resources and performs setup when the web application starts and shuts down). HttpSessionListener ( Notifies when a user's session is created or destroyed). ServletRequestListener ( Notifies when an HTTP request ...