Struts forwarding does not change URL in browser
From: kaman (kaman_lee_at_yahoo.com)
Date: 01/30/04
- Next message: Niki Estner: "Re: Kill a thread automatically"
- Previous message: Adam: "Re: Interfaces and aggregation"
- Next in thread: Chris Riesbeck: "Re: Struts forwarding does not change URL in browser"
- Reply: Chris Riesbeck: "Re: Struts forwarding does not change URL in browser"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 30 Jan 2004 06:58:50 -0800
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
- Next message: Niki Estner: "Re: Kill a thread automatically"
- Previous message: Adam: "Re: Interfaces and aggregation"
- Next in thread: Chris Riesbeck: "Re: Struts forwarding does not change URL in browser"
- Reply: Chris Riesbeck: "Re: Struts forwarding does not change URL in browser"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]