aspose file tools*
The moose likes Servlets and the fly likes HttpSessionBindingListener Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "HttpSessionBindingListener Question" Watch "HttpSessionBindingListener Question" New topic
Author

HttpSessionBindingListener Question

Arshad Azeem
Greenhorn

Joined: Aug 21, 2005
Posts: 13
Hi,

I wanted to know what would happen if you declare a listener say "HttpSessionBindingListener", in your Deployment Descriptor, also write the Listener class to implement the interface, but don't use the listener in any of your servlets.

I know what it does in one container, but in general, Is the implementation Container specific or does the servlet spec say anything about that?

Thanks,
Arshad.

Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
It's just an event listener which "automatically" intercepts on the in the javadoc mentioned events. You don't need to invoke it yourself or so, if you expected to do so. In the methods of the listener class which you override you just write the desired logic which should be executed during the in the javadoc explained event.

The application server implementation is supposed to actually instantiate the listener and execute the methods during the appropriate events.
Arshad Azeem
Greenhorn

Joined: Aug 21, 2005
Posts: 13
Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HttpSessionBindingListener Question