I'm getting the "parameter 'mode' not found error" in
struts DispatchAction when the user session gets expired. The code works perfectly when the session is not expired. But when the session gets expired suddenly Struts says it is not able to find parameter "mode" for action and throws error.
The Action class code is as follows. Take a look at the add(...) method.
struts-config.xml
*****************
I use hidden fields in the
JSP page front-end to pass the parameter 'mode' to the BookAction class.
When the session gets expired, i get all the log (System.out) messages in the BookAction class which says "Session Expired", but after the forward happens (to 'session_expired'), Struts throws the parameter 'mode' not found error. As the ActionForward has already happened to 'session_expired', and the execute() method returns successfully, i'm not sure why some DispatchAction again comes to picture here. The request should have been passed to the 'Login.jsp' page and not into some DispatchAction.
I'm not sure why this kind of error occurs.
Please do let me know if some other info is needed from my side.