, Ranch Hand
May 17, 2011 03:47:08
I have a JSP. Whenever, we submit the JSP and with all the fields filled, it inserts a new record in the DB.
Following is the form tag
<form name="Sorder" action="/sales/urn/show/maintain.do" method="post">
However, whenever the user presses the Refresh icon from the toolbar or does a right-click + refresh, it calls the action which inserts a new record in the DB. We want this not to happen i.e. whenever refresh is called, the action should not be performed.
Please if someone can guide me how to do this.
May 17, 2011 14:19:04
What you are looking for is the
Basically when your servlet finishes the action to insert the record to the DB, you redirect to the result page rather than forward to it.
That creates a new request.
If they then refresh that page, they just refresh the "get" part, not the save.
May 17, 2011 14:20:23
This article might also be helpful.
This thread has been viewed 2952 times.
All times above are in ranch (not your local) time.
The current ranch time is
Oct 20, 2018 09:06:42.