Define a forward called "badToken" (or any name) for the action and forward there if the token is invalid. Using js is a bad idea because it's easily turned off.

David






From: "John Espey" <[EMAIL PROTECTED]>
Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Subject: RE: proper use of back button -- design patterns
Date: Fri, 31 Jan 2003 13:33:35 -0600

I'm curious if people find the token idiom useful in Struts. It seems to me
that if you get a double submission, the first action goes about its
business, and the action invoked on the second submission catches the
problem. But how does that action know where to forward the user? Isn't it
better to handle double submission in javascript so that you don't have to
deal with this issue, or am I missing something?

-----Original Message-----
From: David Graham [mailto:[EMAIL PROTECTED]]
Sent: Friday, January 31, 2003 1:29 PM
To: [EMAIL PROTECTED]
Subject: Re: proper use of back button -- design patterns


You can use tokens to prevent the user from resubmitting a form. See the
Action javadoc for token related methods.

David






>From: Sundar Narasimhan <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: proper use of back button -- design patterns
>Date: Fri, 31 Jan 2003 13:50:09 -0500
>
>I notice that w/ the default configuration on most browsers is to ask
>the user wheter form data should be resent.
>
>I wonder if there are concise descriptions/tutorials on web
>application design that deal with somewhat (I expect :) thorny
>issue. Do people just set the pragmas for cache-control and forget
>about it, or ..
>
>In particular I wonder if there's any support in the struts framework
>for detecting disabling such traversals.
>
>Thanks.
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]


_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE*
http://join.msn.com/?page=features/junkmail


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


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

_________________________________________________________________
STOP MORE SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail


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

Reply via email to