I tried this on my web app  using Struts v1.1b with tiles, but I get the 
following error:

[20/Aug/2002:17:24:06] warning (25350): for host 129.147.152.87 trying to GET 
/sunsentinel/home.page, send-file reports: can't find /sunsentinel/home.page 
(File not found)

Here is the struts-config.xml line where I'm using tiles:

<forward name="success" path="home.page" redirect="true"/>


Any clues??? It works fine if I take out the redirect although I get multiple 
submits on a "Refresh".



Thanks, aj




Andrew Hill wrote:

> Try changing the forward to your view.do in the struts-config to have
> redirect="true".
> This should result in refresh refreshing the url you end up at rather than
> the save.do
> 
> ie:
> <forward  name="mysteryMachine" path="/scooby.do?where=ru" redirect="true"/>
> 
> (nb: redirecting this way will result in no parameters that were submitted
> to save.do being passed back to view.do, which could be a very bad thing
> depending on what you are doing (or it could be a good thing))
> 
> -----Original Message-----
> From: Ray [mailto:[EMAIL PROTECTED]]
> Sent: Monday, August 19, 2002 22:11
> To: [EMAIL PROTECTED]
> Subject: Beating the REFRESH button.
> 
> 
> Hello there again.
> 
> I have a small problem with users hitting the refresh button whilst doing
> things with my application. Here's the scenario:
> 
> User accesses view.do - an action which displays a list of data items,
> along with buttons to add, delete and edit data.  If the add information,
> and it is validated as correct, then the data is written to the database
> with the action savedata.do, and the struts-config.xml redirects back to
> view.do to display the new list.
> 
> The problem is that the last thing in the browser's URL window, is save.do
> (I imagine because servlet redirection does not update the browser's
> history list); so if the user hits refresh, the savedata.do action is
> executed again.
> 
> Is there a tried and tested way to prevent this sort of thing happening.
> I'm thinking that I could call a plain HTML file that calls up event.do
> from JavaScript; that way, it will be written into the browser's history
> list.
> 
> Would that be the best way to go about it, or does someone have a tidier
> suggestion ... ? ... :-)
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
> 



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to