This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
An HttpSessionAttributeListener is normally implemented by an non-attribute class when an associated object needs to know that an attribute has been added to, replaced, or removed from a given session.
An HttpSessionBindingListener is normally implemented by an attribute class when an associated object needs to know that it is bound to or unbound from a session.
The key difference between HttpSessionBindingListener and HttpSessionAttributeListener is that in case of the former, a class itself receives notifications when it's bind to a session or unbind from a session object. Whereas, the HttpSessionAttributeListener is like a generic listener, which can be used to track all attributed which are added, removed or replaced in a session.
Regards, [ July 04, 2008: Message edited by: Kunal Jag ]