K
kaman
Hello,
I have a struts application that adds a customer record via
customerAdd.do then displays the record using customerDisplay.do
On the form, there is an Add button that submits the form data to
customerAdd.do (where the data is added to a db), it then in turns
forwards control along to customerDisplay.do to display the data. In
general:
form submit -> customerAdd.do --> customerDisplay.do
This all works fine. My problem is that after the customer record is
displayed, the browser location bar states that the URL is
http://host/myapp/customerAdd.do. So when a user hits the refresh
button on the browser, it prompts the user asking them if they want to
repost data. If they hit ok, customerAdd.do is called again and a
duplicate record is added into the db.
How can I prevent them from reposting? Or is there a way to change
the URL to customerDisplay.do so that reposting will not matter?
Thanks in advance,
Kaman
I have a struts application that adds a customer record via
customerAdd.do then displays the record using customerDisplay.do
On the form, there is an Add button that submits the form data to
customerAdd.do (where the data is added to a db), it then in turns
forwards control along to customerDisplay.do to display the data. In
general:
form submit -> customerAdd.do --> customerDisplay.do
This all works fine. My problem is that after the customer record is
displayed, the browser location bar states that the URL is
http://host/myapp/customerAdd.do. So when a user hits the refresh
button on the browser, it prompts the user asking them if they want to
repost data. If they hit ok, customerAdd.do is called again and a
duplicate record is added into the db.
How can I prevent them from reposting? Or is there a way to change
the URL to customerDisplay.do so that reposting will not matter?
Thanks in advance,
Kaman