Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts 2 action always returning success

 
Jeffrey Coleman
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
For some reason my action class methods are not executing and the returned string is always "success"

Here is the code for the jsp, action class, and web.xml









If you look on line 47 of the action class you'll see a debugging message. This line never gets executed even though the method of the submit button designates that new_record() method as the method struts should use.

Any help would be appreciated. Thanks
 
Jeffrey Coleman
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I forgot that you might need the struts.xml as well

 
Jeffrey Coleman
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I found the issue. I had set the option for the dynamic method invocation to false so it was always executing the super class execute(). I removed this option from the struts.xml and it worked.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic