• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HttpSessionBindingListener Question

 
Arshad Azeem
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic