aspose file tools*
The moose likes JSP and the fly likes Prevent Duplicate Post on Refresh to Database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Prevent Duplicate Post on Refresh to Database" Watch "Prevent Duplicate Post on Refresh to Database" New topic
Author

Prevent Duplicate Post on Refresh to Database

Joe Mizrahi
Greenhorn

Joined: Jun 14, 2006
Posts: 1
I have two JSP pages, the first allows the user to enter data and submit to a handler page that does the processing, posts the data to the database and re-displays a confirmation of the data entered.

The issue is that if a user "refreshes" the handler page through the browser... the data gets posted to the DB again....

Is there any methodology to prevent this from happening in this context.

Thanks !
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60074
    
  65

Yes. Please read this article and pay particular attention to the PRG pattern.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Prevent Duplicate Post on Refresh to Database
 
Similar Threads
multiple form submission
Problem using Browser Back or Refresh
page relaod probem- resending data to servlet
struts action called on refresh
Disabling a href=...