trobison
asked on
Accessing HttpSession object from jspDestroy()
Is it possible to access the session object in the jspDestroy() method from a JSP page?
I am trying to catch the session timeout to store current preferences in the database.
I am trying to catch the session timeout to store current preferences in the database.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for your input....
Terry
Terry
ASKER
However, I have other developers in my group that would like to access the session object in the init and destroy methods.
I think you can only get to the ServletContext level but you need the request to get the HttpSession object. I can get this far, but this only allows access to attributes bound to the ServletContext. Still cannot figure out how to get the session object from here?
ServletConfig cfg = getServletConfig();
ServletContext ctx = cfg.getServletContext();
Any ideas?