Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple submits from a page...

 
hrishikesh deodhar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a jsp and there is a submit button on it... .
On click of the submit button i create a thread in the action class...
and do an insert in the database... after this, the user is forwarded to another jsp...

this is working fine when the user clicks the submit button once...
but before the user is forwarded to another jsp, if the user clicks multiple times on the submit button... the insert happens multiple times.....

Does the struts framework allow multiple submits to the same action class on click of the submit button...
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Struts has a mechanism to prevent this. For details, see question 5 of the JavaRanch Struts FAQ.
 
hrishikesh deodhar
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Appreciate the reply.. This forum is great.. there is always someone to guide and answer....
Thankyou very much merrill..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic