Introducing the 8 types of listeners
There are 8 types of listeners
Interface | Listens for |
---|---|
ServletRequestListener | New http request |
ServletRequestAttributeListener | Attribute added, modified or removed from request |
HttpSessionListener | http session created or destroyed |
HttpSessionActivationListener | when an object implementing HttpSessionActivationListener are added to/removed from sesison as attribute, its implemented method will be called |
HttpSessionBindingListener | when http server participates in clustered set-up, then this listener is called when session migrates to another server's jvm |
HttpSessionAttributeListener | when an attribute is added to or removed from session |
ServletContextListener | when an http server starts/stops |
ServletContextAttributeListener | when attribute is added to or removed from http server |