You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chris Pat <cp...@yahoo.com> on 2007/08/17 23:29:30 UTC

token html

Hello
I understand half how to process the token, however what is needed on the html side to prevent re-submission of a form?  If I use a struts form tag is it handled automagically?  Presently, without the struts protection, I keep the url of the action in the address bar.  So on refresh it re-submits the request, as expected but not desired.  Is the simplest way to redirect to a jsp page and that would of course stop the refresh submit.  tia

Re: token html

Posted by Paul Benedict <pb...@apache.org>.
If the token is already present in the request, it will be automatically
included as a hidden field.

On 8/17/07, Dave Newton <ne...@yahoo.com> wrote:
>
> --- Chris Pat <cp...@yahoo.com> wrote:
> > Is there special html tag that is needed or do I get
>
> > that for "free" with the struts:form tag?
>
> IIRC the <html:form.../> tag inserts it (if there's a
> token present, of course).
>
> You could just look and see, too.
>
> d.
>
>
>
>
>       ____________________________________________________________________________________
> Park yourself in front of a world of choices in alternative vehicles.
> Visit the Yahoo! Auto Green Center.
> http://autos.yahoo.com/green_center/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: token html

Posted by Dave Newton <ne...@yahoo.com>.
--- Chris Pat <cp...@yahoo.com> wrote:
> Is there special html tag that is needed or do I get

> that for "free" with the struts:form tag?

IIRC the <html:form.../> tag inserts it (if there's a
token present, of course).

You could just look and see, too.

d.



      ____________________________________________________________________________________
Park yourself in front of a world of choices in alternative vehicles. Visit the Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/ 

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


Re: token html

Posted by Chris Pat <cp...@yahoo.com>.
Hi Paul
Okay thanks.  However for the other use cases can you answer it.  Is there special html tag that is needed or do I get that for "free" with the struts:form tag?

Paul Benedict <pb...@apache.org> wrote: Redirection is the correct approach.



Re: token html

Posted by Paul Benedict <pb...@apache.org>.
Redirection is the correct approach.

On 8/17/07, Chris Pat <cp...@yahoo.com> wrote:
>
> Hello
> I understand half how to process the token, however what is needed on the
> html side to prevent re-submission of a form?  If I use a struts form tag is
> it handled automagically?  Presently, without the struts protection, I keep
> the url of the action in the address bar.  So on refresh it re-submits the
> request, as expected but not desired.  Is the simplest way to redirect to a
> jsp page and that would of course stop the refresh submit.  tia
>