aspose file tools*
The moose likes Struts and the fly likes Struts DispatchAction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts DispatchAction "wierd parameter error"" Watch "Struts DispatchAction "wierd parameter error"" New topic
Author

Struts DispatchAction "wierd parameter error"

Victor Murray
Greenhorn

Joined: Feb 24, 2006
Posts: 2
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.
 
Don't get me started about those stupid light bulbs.
 
subject: Struts DispatchAction "wierd parameter error"