You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Viggio, Alex" <Al...@globalcrossing.com> on 2003/08/12 01:36:49 UTC
Synchronization token gotchas?
We have a form with a Submit button that saves information to our database
via a Struts 1.0.2 app, and if successful returns an event ID # that the web
user can use to later lookup and modify the event details. We've have
finally had enough cases of users clicking this button multiple times to
look into addressing this.
The first request is always processed (i.e. the database remains valid), but
the additional requests fail and the user sees an error response. Even if we
start using the built-in Struts synchronization token (i.e.
Action.isTokenValid()), my concern is that users will still not receive the
"success" page listing the event ID #.
I found one possible solution that returns a response to the original
request at http://www.javaworld.com/javatips/jw-javatip136_p.html ("Protect
Web application control flow" article). Has this solution been widely
embraced or debunked? I did a search on the list archives on the solution's
SynchroAction class and didn't find any references.
I also saw multithreading concerns raised by René Vangsgaard at
http://www.jguru.com/faq/view.jsp?EID=779112. A response to this indicated
that the two parameter version of isTokenValid() addresses this if "true" is
passed as the second parameter. Any comments?
Thanks,
- Alex
---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org