GeeCON Prague 2014*
The moose likes Servlets and the fly likes Form being Submitted several times. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "Form being Submitted several times." Watch "Form being Submitted several times." New topic
Author

Form being Submitted several times.

GOVIND
Greenhorn

Joined: Dec 21, 2000
Posts: 2
On my JSP there is a submit button.If the user clicks this button several times simultaneously then the HTML form is submitted several times and probably this causes an error in the Servlet.The doPost method is not synchronized and the servlet is also not thread safe.
What are the possible solutions to this problem.
prakash muthu
Ranch Hand

Joined: Sep 06, 2000
Posts: 75
Hi,
You can use a counter variable. So check the value of counter variable before submitting the form.
If you have any more ideas let me know
-Prakash


Prakash.M<BR>Bangalore- India<BR>(prakashem@rediffmail.com)
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
Please note that The Java Ranch has a naming policy, described here and "GOVIND" is not a valid name. Please choose one which meets the requirements.
Thanks.

Read about me at frankcarver.me ~ Raspberry Alpha Omega ~ Frank's Punchbarrel Blog
GOVIND
Greenhorn

Joined: Dec 21, 2000
Posts: 2
How do I change my User Name now ?
Frank Carver
Sheriff

Joined: Jan 07, 1999
Posts: 6920
Just log in with a different name, and stop using this one.
 
GeeCON Prague 2014
 
subject: Form being Submitted several times.