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

HttpSessionBindingListener

 
rajesh karmani
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
If we implement a class with HttpSessionBingindListener, do we have to register it in web.xml to get the event notifications. I am still confused regarding it
 
Dave Vick
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rajesh
No the HttpSessionBindingListener doesn't have to be configured in the deployment descriptor. This interface is implemented by the objects themselves so they themsleves must implement the methods in the interface not another class like the HttpSessionAttributeListener.
You could have a class called Employee that implements the interface so that whenever an employee object is added to or taken from (bound or unbound) the session the apporpriate method in that class is called.
hope that helps
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic