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]>

Reply via email to