< Prev
Next >



Listener Interfaces



Using the feature of Listener introduced in Servlet, we can make a web application which responds to events taking place in a web application. These events can be of request, session or application level scope. On the basis of these different types of events, there are several Listener interfaces defined under javax.servlet package.




Listener Interfaces


Some of the most important Listener interfaces are -




ServletContextListener


Doing so, we can initialize the objects in servlet context of the web application and destroy these objects when servlet context of a web application is going to be destroyed.




ServletContextAttributeListener







HttpSessionListener


Doing so, we can initialize the objects in HttpSession of the web application and destroy these objects when HttpSession of a web application is going to be invalidated.




HttpSessionAttributeListener







HttpSessionBindingListener







ServletRequestListener







ServletRequestAttributeListener







Please share this article -

Facebook Google Pinterest Reddit Tumblr Twitter



< Prev
Next >
< User Authentication Filter
Servlet Request Listener >
Please subscribe our social media channels for notifications, we post a new article everyday.

Decodejava Google+ Page Decodejava Facebook Page  DecodeJava Twitter Page

Coming Next
-
Python

Ad2