I'm using Struts in web module in my J2EE application.
When session expires, I want to forward to error.jsp.
How can I implement this?
Printable View
I'm using Struts in web module in my J2EE application.
When session expires, I want to forward to error.jsp.
How can I implement this?
use HttpSessionListener and use its life cycle event to detect the session invalidation.
Use following to make sure that the session is invalid and forward or redirect to an error.jsp page.
Code:HttpServletRequest.getRequestedSessionId()
HttpServletRequest.isRequestedSessionIdValid().