IntelliJ Java IDE
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Session Listeners Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Professional Certification » Web Component Certification (SCWCD/OCPJWCD)
Reply Bookmark "Session Listeners" Watch "Session Listeners" New topic
Author

Session Listeners

Frank Beck
Greenhorn

Joined: Apr 10, 2002
Posts: 4
When should the HttpSessionBindingListener be used versus the HttpSessionAttributeListener? I know I am missing something, but the two listeners seem somewhat repetitive. Is the Binding Listener based on the deprecated Value methods? I probably missed it but I have looked at the JavaDocs, the O'Reilly tutorial, and the Specs over the last couple of weeks. Thanks!
Craig Jackson
Ranch Hand

Joined: Mar 19, 2002
Posts: 405
I believe it goes something like this. If a class implements the HttpSessionBindingListener, an object of that class will be notified when it is bound or unbound to the session.
If a class implements the HttpSessionAttributeListener, that object will be notified if any objects are added, removed or replaced in the session.
tony lee
Ranch Hand

Joined: Jan 21, 2002
Posts: 52
Hi,
The difference is that HttpSessionBindingListener can be implemented to notify any object, while HttpSessionAttributeListener is only used for attribute list.


SCJP2, SCWCD
 
IntelliJ Java IDE
 
subject: Session Listeners
 
Threads others viewed
Default Entity Listeners
doubt on session listeners
Listeners question
Listeners
listener
IntelliJ Java IDE