--- Ding Lei <[EMAIL PROTECTED]> wrote: > > Hi Hubert, > Thanks for your reply first .. but: > > On Mon, Jul 12, 2004 at 09:32:45PM -0700, Hubert Rabago wrote: > > This is really how it's designed to work. For a form to be resubmitted, > the > > user will have to regenerate the form, maybe by going back two pages, to > the > > page that was shown *before* the form. As you might already know, this > > protects against accidental double submits. > > Yes, the problem is that even if the form is regenerated, it is STILL USING > THE SAME REQUEST object, which means that the token still stays there.
This suggests that either your Action is not being called (the form is being cached by the browser or the server), or you missed the call to saveToken(request). > > > If you're looking for an alternative, you can, instead of using tokens, > use > > redirects. This will not protect against double submits, but will allow > the > > same form to be resubmitted deliberately, while still protecting against > > refresh operations. You could try manually removing the token, although > > I think that will defeat the purpose of using them. > Well, since we need to pass argument to the index page after user creation, > > so redirect doesn't seem to be possible I actually do this a lot. Struts doesn't have support for adding parameters to redirect at runtime, but a lot of people add the support right in. I have extensions which allow you to add not just parameters, but also ActionMessage objects so you can pass arguments as well as messages like "Your changes have been saved". See http://www.rabago.net/struts/redirect Admittedly it seems like a lot of work to add it into an existing project. That's because of the ActionMessage support. If you don't think you're going to need ActionMessage support but still want something for passing arguments, download the first patch attached to bug 866 (which is for this very issue): http://issues.apache.org/bugzilla/show_bug.cgi?id=866 Hubert > > > Thank you again for your detailed reply! > > -- > Layman <[EMAIL PROTECTED]> Ext: 8059 > __________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]