Hi All, I am little confused with use of HttpSessionAttributeListener and HttpSessionBindingListener. In case of HttpSessionBindingListener, Causes an object to be notified when it is bound to or unbound from a session. HttpSessionAttributeListener, This listener interface can be implemented in order to get notifications of changes to the attribute lists of sessions within this web application. So what's the difference between this two? Can any one pls explain? Sandesh
Regards,<br />Sandesh<br />(SCJCP, SCWCD, SCBCD - 99%, OCP-1)<br /> <br />Either find a way or create one.
For HttpSessionBindingListener, the object that implements that intereface will be notified, when Session Attributes of that object is added, removed or replaced... For HttpSessionAttributeListener, the class that implements this interface must be specified in the Deployment Descriptor. Whenever any session attributes are added, removed and replaced, it will be notified... As conclusion, HttpSessionBindingListener deals with one session object and HttpSessionAttributeListener deals with all available session objects... Hope it clears you...
Co-author of SCMAD Exam Guide, Author of JMADPlus SCJP1.2, CCNA, SCWCD1.4, SCBCD1.3, SCMAD1.0, SCJA1.0, SCJP6.0
Police line, do not cross. Well, this tiny ad can go through:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop