File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Listener Interfaces Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Listener Interfaces" Watch "Listener Interfaces" New topic

Listener Interfaces

Vijay Rajaram

Joined: Nov 17, 2003
Posts: 12
Can someone validate my observation on the configuration of various event listeners?
The classes which implement the interfaces HttpSessionAttributeListener, HttpSessionListener, ServletContextAttributeListener, ServletContextListener has to be configured in the web.xml to get notified of their events.
Where as the classes for the interface HttpSessionActivationListener or HttpSessionBindingListener are not required to be configured in the web.xml and all the objects of those classes which implement these interface and which exist in the current session get notified of its event.
Is my assumption valid?
- VJ
Bruce Jin
Ranch Hand

Joined: Sep 20, 2001
Posts: 672
Yes VJ, you are right about these assumptions.

We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design

Crazy Bikes created by m-Power
I agree. Here's the link:
subject: Listener Interfaces
It's not a secret anymore!