• Post Reply Bookmark Topic Watch Topic
  • New Topic

Struts DispatchAction "wierd parameter error"

 
Victor Murray
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!