This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
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

HttpSessionAttributeListener vs HttpSessionBindingListenter

 
ming zhu
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
Can someone please explain the difference between these two interfaces? When do I use them? I guess I do not understand the exact meaning of binding.
Thanks in advance.
 
Andy Wong
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
This is a rephase of what I got from the SCWCD Exam Study Kit:
"Difference between HttpSessionAttributeListener and HttpSessionBindingListener is that HttpSessionAttributeListener is configured in the deployment descriptor and the container creates only one instance of the specified class. While HttpSessionBindingListener is not configured in the deployment descriptor. The servlet container calls methods on an object implementing this interface only if that object is added or removed from a session. While the HttpSessionAttributeListener interface is used to track the activity for all sessions on an application, the HttpSessionBindingListener interface is used to take actions when certain kinds of objects are added or removed from a session."
Thanks,
Andy
 
ming zhu
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks, Andy!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic