This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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.
 
 
subject: Struts DispatchAction "wierd parameter error"
 
Similar Threads
server side struts validation
Struts DispatchAction "Wierd Parameter Error"
form bean doesn't come into picture
Not able to see the errors on JSP
problem getting data from form bean