You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Information Guzzler <in...@gmail.com> on 2007/01/05 18:15:29 UTC
ActionRedirect with POST parameters
Hi,
Is there a way to use ActionRedirect(Struts 1.2.7 & later) with POST
parameters and not GET.
/S
Re: ActionRedirect with POST parameters
Posted by Michael Jouravlev <jm...@gmail.com>.
On 1/5/07, Information Guzzler <in...@gmail.com> wrote:
> Hi,
>
> Is there a way to use ActionRedirect(Struts 1.2.7 & later) with POST
> parameters and not GET.
No. Currently Struts 1.x is able either to forward (in-server) or to
redirect (through browser) a request based on "redirect" flag. Setting
"redirect" to false results in forwarding, setting "redirect" to true
results in 302 redirection. With 302 HTTP response code most browsers
redirect with GET without confirmation.
If you want to redirect POST with POST, you need to return 307 HTTP
response code from Struts instead of 302. You can do it yourself. In
fact, ActionRedirect is not need to perform a redirect.
Remember, that not all browsers correctly handle 307 response code.
Also, if a browser DOES correctly handle this code, a user would have
to confirm redirection. Do you really want this?
See more here: http://ppewww.physics.gla.ac.uk/~flavell/www/post-redirect.html
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: ActionRedirect with POST parameters
Posted by Mike Baroukh <mb...@cardiweb.com>.
The only way, il you really want to make it, is to generate a form to
the client with an action that post it automatically on load ....
Mike
Information Guzzler a écrit :
> Yep, .... Is there a workaround?
>
> On 1/5/07, Antonio Petrelli <ap...@apache.org> wrote:
>>
>> Information Guzzler ha scritto:
>> > Hi,
>> >
>> > Is there a way to use ActionRedirect(Struts 1.2.7 & later) with POST
>> > parameters and not GET.
>>
>> Errr... no, it is an HTTP limitation.
>>
>> Antonio
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
--
Mike Baroukh
---
Cardiweb - 31 Rue de Mogador Paris IXeme
06 63 57 27 22 - 01 53 21 82 63 - Jabber: mbaroukh@jabber.org
http://www.cardiweb.com
---
Re: ActionRedirect with POST parameters
Posted by Information Guzzler <in...@gmail.com>.
Yep, .... Is there a workaround?
On 1/5/07, Antonio Petrelli <ap...@apache.org> wrote:
>
> Information Guzzler ha scritto:
> > Hi,
> >
> > Is there a way to use ActionRedirect(Struts 1.2.7 & later) with POST
> > parameters and not GET.
>
> Errr... no, it is an HTTP limitation.
>
> Antonio
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: ActionRedirect with POST parameters
Posted by Antonio Petrelli <ap...@apache.org>.
Information Guzzler ha scritto:
> Hi,
>
> Is there a way to use ActionRedirect(Struts 1.2.7 & later) with POST
> parameters and not GET.
Errr... no, it is an HTTP limitation.
Antonio
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org