Submit Button multiple click issue

B

Brill2

Hello Guru's,
Do not know if I am posting in the right place and please let me know
if it is not. I have an issue with an application that I am building
that uses JSP and SERVLETS. Basically when someone clicks the submit
button more than once their record gets saved twice in the database.
I'm sure this issue has been adressed before but what I have seen to
date is people recommending disabling the submit button.

I don't want to do something client side which might potentially take
away functionality from the user. What I would like to know if there
is anything in the HttpServletRequest or HttpRequest objects that might
be able to help me identify if the user clicked the submit button
twice.

Any ideas out there?

Greatly appreciate your thoughts,
Regards,
Dave
 
R

raavi

Hi
you may do onething to resolve the problem.i.e first of all u have
to check whether there is any duplicate and insert only if there is no
duplicate.
 
D

Dave Glasser

Hello Guru's,
Do not know if I am posting in the right place and please let me know
if it is not. I have an issue with an application that I am building
that uses JSP and SERVLETS. Basically when someone clicks the submit
button more than once their record gets saved twice in the database.
I'm sure this issue has been adressed before but what I have seen to
date is people recommending disabling the submit button.

I don't want to do something client side which might potentially take
away functionality from the user. What I would like to know if there
is anything in the HttpServletRequest or HttpRequest objects that might
be able to help me identify if the user clicked the submit button
twice.

Any ideas out there?

Google for "synchronizer token".


--
Check out QueryForm, a free, open source, Java/Swing-based
front end for relational databases.

http://qform.sourceforge.net

If you're a musician, check out RPitch Relative Pitch
Ear Training Software.

http://rpitch.sourceforge.net
 
R

raavi

Hi
u can do this also. i.e u can pass some value to the function that
is called on the onclick event and check for the same in the function
and call the servlet accordingly.use javascript for this.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top