You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by "info@flyingfischer.ch" <in...@flyingfischer.ch> on 2017/06/29 10:14:41 UTC

redirectAction: different behaviour depending on the name of the result

No big deal and probably not related to 2.5.11. Is this on purpose:

redirectAction behaves differently depending on the name of the result.

      <result name="redirectToLogin" type="redirectAction">
            <param name="actionName">login</param>
            <param name="myParam">${myParam}</param>
      </result>

Called in action as: return "redirectToLogin";

=> myParam gets transmitted as expected.

      <result name="input" type="redirectAction">
            <param name="actionName">login</param>
            <param name="myParam">${myParam}</param>
      </result>

Called in action as: return INPUT;

=> myParam does not get transmitted.

Markus

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


Re: redirectAction: different behaviour depending on the name of the result

Posted by "info@flyingfischer.ch" <in...@flyingfischer.ch>.
> This may have other reasons. Is there a value for myParam in every case? 
> What have you configured for struts.url.includeParams?
>
>
> Regards,
> Christoph
>
> This Email was scanned by Sophos Anti Virus
>
You are right! It's been an issue with myParam and not the architecture.
Shame...

It works in both ways, independent of the name of the result.

struts.url.includeParams however is not set explicit.

Markus

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


Re: redirectAction: different behaviour depending on the name of the result

Posted by Christoph Nenning <Ch...@lex-com.net>.
> 
> No big deal and probably not related to 2.5.11. Is this on purpose:
> 
> redirectAction behaves differently depending on the name of the result.
> 
>       <result name="redirectToLogin" type="redirectAction">
>             <param name="actionName">login</param>
>             <param name="myParam">${myParam}</param>
>       </result>
> 
> Called in action as: return "redirectToLogin";
> 
> => myParam gets transmitted as expected.
> 
>       <result name="input" type="redirectAction">
>             <param name="actionName">login</param>
>             <param name="myParam">${myParam}</param>
>       </result>
> 
> Called in action as: return INPUT;
> 
> => myParam does not get transmitted.
> 
> Markus
> 

This may have other reasons. Is there a value for myParam in every case? 
What have you configured for struts.url.includeParams?


Regards,
Christoph

This Email was scanned by Sophos Anti Virus