Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC 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
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Action class called twice !!  RSS feed

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have three pieces :

EmploymentHistoryAction.java
EmploymentHistoryForm.java
EmploymentHistory.jsp


when I point to : http://localhost:9080/EA/EmploymentHistory.do , it goes into perform() method ,
Now when I submit this page it goes into perform method twice !!!
And this behaviour is leading me in hell ...

NOTE: i read somewhere that the good technique is to use two action for one JSP . one for prefilling and other one for submitting...

Can anybody throw some light on this issue ?

All replies are appreciated ...thank you

-Anand.
 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had a similar problem once. What I later found out was I had some mistype in the code. In my page, I had a
Then the javascript somefunction() has form.submit() in it, thus submitting the form twice.

I changed <html:submit> to <html:button> and it was fine.
 
I child proofed my house but they still get in. Distract them with this tiny ad:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!