Meaningless Drivel is fun!*
The moose likes Struts and the fly likes Multiple submits from a page... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Multiple submits from a page..." Watch "Multiple submits from a page..." New topic
Author

Multiple submits from a page...

hrishikesh deodhar
Greenhorn

Joined: Feb 27, 2007
Posts: 11
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

Joined: Feb 15, 2005
Posts: 4864
Struts has a mechanism to prevent this. For details, see question 5 of the JavaRanch Struts FAQ.


Merrill
Consultant, Sima Solutions
hrishikesh deodhar
Greenhorn

Joined: Feb 27, 2007
Posts: 11
Appreciate the reply.. This forum is great.. there is always someone to guide and answer....
Thankyou very much merrill..
 
 
subject: Multiple submits from a page...
 
Similar Threads
submit button
Submitting from "/a.do" to "/b.do"
JSF in WSAD 5.1.2
Javascript - onfocus() problem
Confirm message on submit