This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I am trying to define a general error page for session time out, when use type *.do I want to forward request to my predefined error page. I have defined isSessionTimeOut methed in my action parent class to check session status, and in each action class I have: if (isSessionTimeOut(request)) return mapping.findForward("error"); The problem is sometimes the action's execute method is not called as the validate method in ActionForm may return ActionErrors and request will be forwarded to the input page instead of my error page, has any one met this kind of situation before and had the solutions? Thanks.
You might want to create your own RequestProcessor and override the processPreprocess() method. In that method put your check for Session time out and then invoke doForward(uri, request, response) with time out page and return false from that method. else return true. The Struts RequestProcessor calls the processPreprocess() in its process() method even before populating the ActionForm and doing other tasks like validation etc.. Hope this helps, Srikanth Shenoy [ February 27, 2004: Message edited by: Srikanth Shenoy ]