• Post Reply Bookmark Topic Watch Topic
  • New Topic

difference between HttpSessionAttributeListener and HttpSessionBindingListner

 
Srikanth Raghavan
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the difference between HttpSessionAttributeListener and HttpSessionBindingListner? They both are really confusing me.

And why we don't have to register HttpSessionBindingListener in the DD? why it just happens automatically?

Thanks in advance,
Srikanth
 
Sathish Nagappan
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HttpSessionAttributeListener should be defined in the DD. The callback methods of this class will be called whenever any object gets added or removed from a session.

HttpSessionBindingListener should not be defined in the DD. The callback methods of this class will be called whenever an object of that class (the attribute class it is so called) gets binded or unbinded from a session.

Hope this clears.
 
Srikanth Raghavan
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Ashwanth, clear
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!