• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Struts DispatchAction "wierd parameter error"

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
You ridiculous clown, did you think you could get away with it? This is my favorite tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic