Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

multiple execution in the Action class

 
Ranch Hand
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 755
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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"/>

 
Do not threaten THIS beaver! Not even with this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic