You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Gena Ganebnyi <gg...@nebulent.com> on 2010/12/20 23:18:02 UTC

?statusCode=303 get appended to url when using rest plugin

I have the following annotations placed on my controller to assure
redirect-after-post:
@Results({
  @Result(name="create", type="redirect", location="/schedule/"),
  @Result(name="update", type="redirect", location="/schedule/"),
  @Result(name="destroy", type="redirect", location="/schedule/")
})
When redirect is performed ?statusCode=303 is appended to url. Is there any
way to avoid this?

Genadii

Re: ?statusCode=303 get appended to url when using rest plugin

Posted by Gena Ganebnyi <gg...@nebulent.com>.
>> Is it really so annoying?
in case you are trying to achive clean urls looks quite awkward

>> If the answer is yes, the next step would be opening an issue, could
>> you file an issue for this?
will do



On Tue, Dec 21, 2010 at 1:45 PM, Maurizio Cucchiara <
maurizio.cucchiara@gmail.com> wrote:

> Ok,
> I've got the point (I wrongly thought was a convention issue).
>
> The answer is: no (AFAIK), there is no-way to get rid of the
> statusCode param, I mean nothing simple (You should extend class,
> handling xml-configuration file, and so on).
>
> The good news is that it would be possible to insert into the
> ProhibitedResultParams of ServletRedirectResult.
>
> Is it really so annoying?
>
> If the answer is yes, the next step would be opening an issue, could
> you file an issue for this?
>
>
>
>
> 2010/12/21 Gena Ganebnyi <gg...@nebulent.com>:
> > 2.2.1
> >
> > On Tue, Dec 21, 2010 at 10:48 AM, Maurizio Cucchiara <
> > maurizio.cucchiara@gmail.com> wrote:
> >
> >> Which struts2 version are we talking about?
> >>
> >> 2010/12/20 Gena Ganebnyi <gg...@nebulent.com>:
> >> > I have the following annotations placed on my controller to assure
> >> > redirect-after-post:
> >> > @Results({
> >> >  @Result(name="create", type="redirect", location="/schedule/"),
> >> >  @Result(name="update", type="redirect", location="/schedule/"),
> >> >  @Result(name="destroy", type="redirect", location="/schedule/")
> >> > })
> >> > When redirect is performed ?statusCode=303 is appended to url. Is
> there
> >> any
> >> > way to avoid this?
> >> >
> >> > Genadii
> >> >
> >>
> >>
> >>
> >> --
> >> Maurizio Cucchiara
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
>
>
>
> --
> Maurizio Cucchiara
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: ?statusCode=303 get appended to url when using rest plugin

Posted by Maurizio Cucchiara <ma...@gmail.com>.
Ok,
I've got the point (I wrongly thought was a convention issue).

The answer is: no (AFAIK), there is no-way to get rid of the
statusCode param, I mean nothing simple (You should extend class,
handling xml-configuration file, and so on).

The good news is that it would be possible to insert into the
ProhibitedResultParams of ServletRedirectResult.

Is it really so annoying?

If the answer is yes, the next step would be opening an issue, could
you file an issue for this?




2010/12/21 Gena Ganebnyi <gg...@nebulent.com>:
> 2.2.1
>
> On Tue, Dec 21, 2010 at 10:48 AM, Maurizio Cucchiara <
> maurizio.cucchiara@gmail.com> wrote:
>
>> Which struts2 version are we talking about?
>>
>> 2010/12/20 Gena Ganebnyi <gg...@nebulent.com>:
>> > I have the following annotations placed on my controller to assure
>> > redirect-after-post:
>> > @Results({
>> >  @Result(name="create", type="redirect", location="/schedule/"),
>> >  @Result(name="update", type="redirect", location="/schedule/"),
>> >  @Result(name="destroy", type="redirect", location="/schedule/")
>> > })
>> > When redirect is performed ?statusCode=303 is appended to url. Is there
>> any
>> > way to avoid this?
>> >
>> > Genadii
>> >
>>
>>
>>
>> --
>> Maurizio Cucchiara
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>



-- 
Maurizio Cucchiara

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


Re: ?statusCode=303 get appended to url when using rest plugin

Posted by Gena Ganebnyi <gg...@nebulent.com>.
2.2.1

On Tue, Dec 21, 2010 at 10:48 AM, Maurizio Cucchiara <
maurizio.cucchiara@gmail.com> wrote:

> Which struts2 version are we talking about?
>
> 2010/12/20 Gena Ganebnyi <gg...@nebulent.com>:
> > I have the following annotations placed on my controller to assure
> > redirect-after-post:
> > @Results({
> >  @Result(name="create", type="redirect", location="/schedule/"),
> >  @Result(name="update", type="redirect", location="/schedule/"),
> >  @Result(name="destroy", type="redirect", location="/schedule/")
> > })
> > When redirect is performed ?statusCode=303 is appended to url. Is there
> any
> > way to avoid this?
> >
> > Genadii
> >
>
>
>
> --
> Maurizio Cucchiara
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: ?statusCode=303 get appended to url when using rest plugin

Posted by Maurizio Cucchiara <ma...@gmail.com>.
Which struts2 version are we talking about?

2010/12/20 Gena Ganebnyi <gg...@nebulent.com>:
> I have the following annotations placed on my controller to assure
> redirect-after-post:
> @Results({
>  @Result(name="create", type="redirect", location="/schedule/"),
>  @Result(name="update", type="redirect", location="/schedule/"),
>  @Result(name="destroy", type="redirect", location="/schedule/")
> })
> When redirect is performed ?statusCode=303 is appended to url. Is there any
> way to avoid this?
>
> Genadii
>



-- 
Maurizio Cucchiara

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