Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

RE: [s2] Actions in different Namespaces

Wesley Wannemacher

2007-01-26

Replies:

I'm using the following:

   <action name="Login_*"
class="com.doubleatrailer.struts.Actions.Login" method="{1}">
     <result name="input">/WEB-INF/jsp/Login.jsp</result>
     <result
name="LoginFailure">/WEB-INF/jsp/LoginFailed.jsp</result>
     <result type="redirect-action">
       <param name="actionName">index</param>
       <param name="namespace">/customer</param>
     </result>
   </action>

This works fine for me. In fact, this isn't the only action I have that
forwards to an action in a different namespace, but it's all pretty much the
same.

-Wes

> -----Original Message-----
> From: eciment@(protected)
> Of Elie Ciment
> Sent: Friday, January 26, 2007 2:05 PM
> To: Struts Users Mailing List
> Subject: [s2] Actions in different Namespaces
>
> Is it possible to redirect an action in one namespace to
> another? I wasn't
> able to do so...
>
> For example, to take an action "Example_create" in the
> "example" namespace,
> and if for some reason the user was logged out in the
> meantime, is there a
> way to forward them to the "security" namespace to the
> "Login_input" action?
>
> Thanks,
> EC
>

Attachment: smime.p7s
©2008 junlu.com - Jax Systems, LLC, U.S.A.