I have a Jsp page that accepts some parameters from the user. Now if the user clicks on the Submit button in rapid succession, multiple entries are inserted in DB, though I am checking for duplicate entries.

Laurent Mihalkovic

implement a simple state machine inside your server side code. A simple way to do that is to carry a hidden parameter inside your form that indicates what step the user is at. If you don't want to carry the information from one page to the next, store the information inside the servlet session. Then before processing the submitted info, check that the step has not already been performed (ie: the user has already submitted the form).

0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



About | Sitemap | Contact