• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Form being Submitted several times.

 
GOVIND
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
GOVIND
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I change my User Name now ?
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just log in with a different name, and stop using this one.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic