• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

difference between valueBound() and attributeAdded()

 
krishna prasad gunasekaran
Ranch Hand
Posts: 158
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what's the difference between valueBound() of HttpSessionBindingListener, and attributeAdded() of HttpSessionAttributeListener. Both are called when an attribute is added to a session. valueBound()is implemented by the attribute itself, and attributeAdded()is implemented by some other class.
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The difference resides in the type of listener you use. If you want to listen to the Session, you'll use HHttpSessionAttributeListener and then be able to check every attributes added to it.
If you want to know when a particular attribute is being bound to a session, you will use HttpSessionBindingListener.
[ September 04, 2006: Message edited by: Satou kurinosuke ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic