Hi, can someone tell me what is the major difference between HttpSessionBindingListener and HttpSessionAttributeListener. becoz these two interfacing is confusing me. I think the functionality of interfaces is all most if i understood their functionality right.
HttpSessionAttributeListener interface allows a developer to recieve notifications whenever changes occur to the attribute list of the HttpSession object such as adding a new attribute,removing an existing attribute and replacing an existing attribute.it is configured in deployment descripter. HttpSessionBingingListener is implemented by the classes whose object need to recieve notifications whenever they are added to or removed from a session.It's not required to explicitly mention it in deployment descriptor.Hence an object is added to or removed from any session,the container calls the interface implemented by that object. Regards,
Hi The servlet container calls method on an object implementing HttpSessionBindingListener only if that particular object is added or removed from the session. On the otherhand if a listener class implements HttpSessionAttributeListener, container will call its method if any object is added or removed from session. --------------- Sainudheen