Can anyone help me??? thanks

how to avoid duplicating submit of jsp ????
There are two jsp which i call 1.jsp and 2.jsp ; a method in a action.
in 1.jsp one should write his or her name in the blank and then click the "submit" button to skip to the method in which the name will be transferred to a database which i can't control. If it succeeds, at the end of the method it will findForward to 2.jsp. But if you click the backout button on IE or the backspace button on keyboard to 1.jsp and write another name in the blank and also click the "submit" button to skip to the method and then the 2.jsp , the name in the database will be changed which is not supposed.
thanks for your help!!!!
jjrainbow

Welcome to web applications.
Why is the name not supposed to be changed?
You entered in a new name and pressed save, so it should save that name to the database right?
What would you expect to happen?
There are a few things you can do to try and stop this. None of them are foolproof though.
1 - After you "save" use a response.redirect() to display the result. That will mean if the user presses the "refresh" button, it won't resubmit the "save" event but the display one.
2 - Use a "token". Struts has support for this. Basically give every page a unique "token" every you serve it. Keep that token in session, and also have it in a hidden field on the page. When the page is submitted you can compare the token submitted to the one you are expecting in session, and if they are different you know the user has been using the back button.

Similar Messages

Maybe you are looking for

  • All files except HDD icons disappered from desktop

    I am using Lion. Suddenly, all of the files and folders from my desktop disappered. I have tried to reset desktop and finder preferences by deleting plist files from Library/preferences but no success. Any idea?

  • Between operator for group by date in Apex Interactive Reports

    Hi, In the interactive reports filter, i couldn't find the 'between' operator for date field (got a 'group by date' in my sql query (source). I am just wondering, Is it beacuse of the group by date clause?. Is there any way to show the 'between' oper

  • Lync 2013 stopped working after update

    Lync starts up fine, but when I click a contact or receive a message, Lync crashes I already updated and repaired office. I do have office 2010 and 2013 installed, but 2010 doesn't have Lync so there shouldn't be a conflict there. Event logs: Log Nam

  • Db replication

    Hi experts following is the scenario operation system Linux database 11G We have database in EU and users are connected to it via India. we are facing severe connectivity and performance for sending data or processing data possible solution would be

  • Help with converting FLAC to ALAC while retaining metadata and cover art

    Hi, I've decided to embark on the long trek to convert my 18k+ FLAC music library into ALAC. I've decided on ALAC for mainly 2 reasons: iTunes/iPhone/iMac/Sonos compatibility and my desire to keep with a lossless format. My library is pretty eclectic