You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Leonidas Papadakis <lp...@bluecore.gr> on 2009/02/09 18:39:24 UTC
action alias / redirect
Greetings to all,
in my struts2 actions file i have the following entry for an action :
<action name="SelectStepA" class="action.SelectStepA">
... (interceptors, results)
...
</action>
i would like to have another action with "shortname" ie ssa that will
redirect to the above action (sending all the url parameters)
What is the best way to do this ?
Thank you very much
Best Regards,
Leon
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: SV: action alias / redirect
Posted by Leonidas Papadakis <lp...@bluecore.gr>.
That's perfect.
Thank you very much Christer, much obliged.
Regards,
Leonidas
Christer Gjerstad wrote:
> Hello Leonidas,
>
> Common practice for doing this would be as follows:
>
> <package name="yourPackageName" namespace="/" extends="struts-default">
>
> <action name="ssa" class="your.namespace.ssaAction">
> <result type="redirectAction">
> <param name="actionName">SelectStepA</param>
> <!-- Provided if action to redirect to is in
> another namespace. -->
> <param
> name="namespace">yourRedirectActionsNamespace</param>
> <!-- Property found on the value stack. Can
> also be hard coded. -->
> <param name="param1">${propertyName}</param>
> <param name="param2">${propertyName}</param>
> </result>
> </action>
>
> <action name="SelectStepA"
> class="your.namespace.SelectStepA">
> ...
> </action>
>
> </package>
>
>
> Hope that answers your question.
>
> Kind regards
>
> Christer!
>
>
>
> -----Opprinnelig melding-----
> Fra: Leonidas Papadakis [mailto:lpap@bluecore.gr]
> Sendt: 9. februar 2009 18:39
> Til: Struts Users Mailing List
> Emne: action alias / redirect
>
> Greetings to all,
>
> in my struts2 actions file i have the following entry for an action :
>
> <action name="SelectStepA" class="action.SelectStepA"> ... (interceptors,
> results) ...
> </action>
>
> i would like to have another action with "shortname" ie ssa that will
> redirect to the above action (sending all the url parameters)
>
> What is the best way to do this ?
>
> Thank you very much
>
> Best Regards,
>
> Leon
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
SV: action alias / redirect
Posted by Christer Gjerstad <ch...@idemand.no>.
Hello Leonidas,
Common practice for doing this would be as follows:
<package name="yourPackageName" namespace="/" extends="struts-default">
<action name="ssa" class="your.namespace.ssaAction">
<result type="redirectAction">
<param name="actionName">SelectStepA</param>
<!-- Provided if action to redirect to is in
another namespace. -->
<param
name="namespace">yourRedirectActionsNamespace</param>
<!-- Property found on the value stack. Can
also be hard coded. -->
<param name="param1">${propertyName}</param>
<param name="param2">${propertyName}</param>
</result>
</action>
<action name="SelectStepA"
class="your.namespace.SelectStepA">
...
</action>
</package>
Hope that answers your question.
Kind regards
Christer!
-----Opprinnelig melding-----
Fra: Leonidas Papadakis [mailto:lpap@bluecore.gr]
Sendt: 9. februar 2009 18:39
Til: Struts Users Mailing List
Emne: action alias / redirect
Greetings to all,
in my struts2 actions file i have the following entry for an action :
<action name="SelectStepA" class="action.SelectStepA"> ... (interceptors,
results) ...
</action>
i would like to have another action with "shortname" ie ssa that will
redirect to the above action (sending all the url parameters)
What is the best way to do this ?
Thank you very much
Best Regards,
Leon
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: action alias / redirect
Posted by Jack Qu <qu...@hotmail.com>.
may be the action chain result type can help to do this !
--------------------------------------------------
From: "Leonidas Papadakis" <lp...@bluecore.gr>
Sent: Tuesday, February 10, 2009 1:39 AM
To: "Struts Users Mailing List" <us...@struts.apache.org>
Subject: action alias / redirect
> Greetings to all,
>
> in my struts2 actions file i have the following entry for an action :
>
> <action name="SelectStepA" class="action.SelectStepA">
> ... (interceptors, results)
> ...
> </action>
>
> i would like to have another action with "shortname" ie ssa that will
> redirect to the above action (sending all the url parameters)
>
> What is the best way to do this ?
>
> Thank you very much
>
> Best Regards,
>
> Leon
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org