Page refresh is forcing form re-submit
843833Oct 31 2001 — edited Nov 10 2001Help!
My JSP contains a form with a POST action (that calls a servlet). The POST causes the form data to be saved to a database. Simple. However, if the user hits the browser's Refresh button, the form data gets re-submitted, thus causing another row to be added.
I've tried setting flags in HIDDEN form items, but the very same form data is re-posted each time the refresh button is hit, so I can't really detect if the user has hit the Submit button, or hit the Refresh button.
Does anyone have a nice solution (in code) to this? It would really help.
Regards,
Andy Deighton
Green Room GB Ltd
www.greenroomgb.com