wood burning stoves 2.0*
The moose likes Struts and the fly likes Struts 2 action always returning success Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 action always returning success" Watch "Struts 2 action always returning success" New topic
Author

Struts 2 action always returning success

Jeffrey Coleman
Greenhorn

Joined: May 25, 2012
Posts: 23
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

Joined: May 25, 2012
Posts: 23
Sorry, I forgot that you might need the struts.xml as well

Jeffrey Coleman
Greenhorn

Joined: May 25, 2012
Posts: 23
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts 2 action always returning success