wood burning stoves 2.0*
The moose likes Struts and the fly likes multiple execution in the Action class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "multiple execution in the Action class" Watch "multiple execution in the Action class" New topic
Author

multiple execution in the Action class

Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
Hi guys,

My form is one page with a save button.
when the user clicks save the Form gets into action and if valid --> move to the Action, after the action, a message should appear on the same page "Success" that's it.

for some reason, when the user click save (and the form is ok) the Action is committed multiple time (until I get: javax.servlet.ServletException: Servlet execution threw an exception)

Anyway, I wonder what can cause this error?

the struts-config looks like this:


and the Action (just as a test)


I suspect that this occurs because "saveOK" ref to the same action path (maybe?!)
Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
well, probably it was tooooo late.
anyway, i got it, it's the forward name, shouldn't be the .do! should have been the input as in:

<forward name="saveOK" path="/pages.travelers/display/displayAccount.jsp"/>

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: multiple execution in the Action class