This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Data getiing Re-Submitted Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Reply locked New topic
Author

Data getiing Re-Submitted

Nicolas Flammel
Ranch Hand

Joined: May 05, 2004
Posts: 32
When I press F5 after submitting a form and coming to another JSP(and there is not error in form submission), the data of the form(already submitted) gets submitted again i.e. the previous form gets submitted over and over again although the current form on the screen must get refreshed.

How can I prevent this?
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15357
    
    6
You have to do it on your server side code that recognizes that the data is repeated.

Or expire the page with Meta tags.

or you can keep a cookie, but not everyone has them enabled.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 56180
    
  13

Please do not cross-post the same question in multiple forums. It wastes people's time when multiple redundant conversations take place. Please continue any discussion of this topic here.


[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Data getiing Re-Submitted
 
Similar Threads
is it good design having mutiple forms in a jsp
Form submission in struts 1.2
Strange problem. Formgetting submitted in firefox but not in IE
Data getiing Re-Submitted
onSubmit event on form