How can i get notified when my Object gets bounded/unbounded to a session object of HTTP.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Let the object’s class implement
HttpSessionBindingListener.If you have no control over the object’s class code and thus you can’t change its code, then an alternative is to implement
HttpSessionAttributeListener.Note: when you’re still on Servlet 2.5 or older, replace
@WebListenerby a<listener>configuration entry inweb.xml.