Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HTTP SessionListener

 
Ina Thomas
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does somebody knows that the difference is between attribute added with a
HttpSessionAttributeListener and Object bound in HttpSessionBindingListener?
 
Martyn Clark
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ina
With the HttpSessionAttributeListener this one notifies when attribute is added, removed, or replaced. The HttpSessionBindingListener notifies an "Object" when it is being bound or unbound to a session is also identifies the session.
 
Mahendar Reddy
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ina...

HttpSessionAttributeListenenr is implemented by any class, where as HttpSessionBindingListener is implemented by an attribute class.
 
Flom Xanther
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
furthermore, HttpSessionAttributeListener has to be declared in your deployment descriptor (web.xml), while HttpSessionBindingListener doesn't.


Re-read this topic, it's fundamental.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic