We have a
Struts application in which we are setting the session timeout time in Web.xml and listening the session time out using a class implementing 'HttpSessionBindingListener'.
Webshphere Application Server 5.0.x
Upon session timeout 'valueUnbound' method gets called.
Requirement is to direct user to a particular 'SessionExpired.jsp' from this method.
Setting 'response' in 'session' in every Action that is called.
Inside 'vlaueUnbound(HttpSessionBindingEvent event)' I am doing the following:
1) HttpSession session = event.getSession();
2) Retrieve the 'response' from 'session'.
3) Call response.sendRedirect("/view/jsp/common/SessionExpired.jsp");
I am getting an exception on response.sendRedirect...
java.lang.IllegalStateException: Context has not been prepared for next connection
:
:
Any other method that I should call or any other technique that we should use. Objective can be achieved from
JSP also but we want ot do this from server side only.