wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Listener Question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Listener Question" Watch "Listener Question" New topic
Author

Listener Question

Sethu Prem
Greenhorn

Joined: Aug 10, 2005
Posts: 6
Can somebody explain me the difference between
HttpSessionBindingListener and HttpSessionAttributeListener

1. Do they differ only by the object type they handle ?

2. Is there any order in which the listeners are invoked when a session
is being invalidated or being destroyed ?

Thanks
SP
Vishnu Prakash
Ranch Hand

Joined: Nov 15, 2004
Posts: 1026
An object of the class that implements HttpSessionBindingListener interface will be informed when it is added/deleted (bound/unBound) from the session.

An object of the class that implements HttpSessionAttributeListener interface will be informed whether an attribute has been added/removed/replaced from the session.

HttpSessionBindingListener will be invoked before HttpSessionAttributeListener when an Object is bound/unBound from the session.
[ October 05, 2005: Message edited by: vishnu prakash ]

Servlet Spec 2.4/ Jsp Spec 2.0/ JSTL Spec 1.1 - JSTL Tag Documentation
Sethu Prem
Greenhorn

Joined: Aug 10, 2005
Posts: 6
Thanks for the explanation.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Listener Question
 
Similar Threads
Hi Techies and Geeks
Posting to bump up my count...
Search Function
Java or NOT Java?
class path resource [spring xml file] cannot be opened