struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Germuska <...@Germuska.com>
Subject Re: user hitting back-button and sending POSTDATA
Date Wed, 11 May 2005 16:35:18 GMT
At 11:14 AM -0500 5/11/05, Scott Purcell wrote:
>I am having trouble getting information, or a workaround for the 
>following problem.
>
>A user fills out a simple textfield form. I update the database with 
>the value and show a new jsp page. Then the user hits the 
>back-button, and even though the browser gives an alert  (this will 
>POSTDATA that is expired as cache") yes or no? And they say yes, I 
>enter another record into my database. Causing problems.
>
>I have my nocache set to true in my struts-config.xml. Any other 
>ideas, solutions to this problem?

Struts provides a simple "token" facility which allows you to embed a 
one-use token in a page; you can write your action to detect when the 
page's token is no longer valid and handle it as an error condition 
instead of passing the values through to your database.

See the online docs for full details.

Joe

-- 
Joe Germuska            
Joe@Germuska.com  
http://blog.germuska.com    
"Narrow minds are weapons made for mass destruction"  -The Ex

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message