You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Henry Park <hs...@hotmail.com> on 2007/10/05 00:02:43 UTC

calling action

How can I forward to a url from within my action class?  For example, instead of 'return SUCCESS' I just want to call another action... something like 'return SomeAction!doit.action.  Any ideas? Thanks in advance.
_________________________________________________________________
Windows Live Hotmail and Microsoft Office Outlook – together at last.  Get it now.
http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033

Re: calling action

Posted by Wes Wannemacher <we...@wantii.com>.
How about ->

<action name="YourFirstAction" class="...">
    <result type="redirect-action">
            <param name="actionName">YourSecondAction</param>
    </result>

http://struts.apache.org/2.0.9/docs/redirect-action-result.html

The downside is that it is a redirect, so you any data from
YourFirstAction that you want in YourSecondAction will have to be put
into the session.

-W

On 10/4/07, Henry Park <hs...@hotmail.com> wrote:
>
> How can I forward to a url from within my action class?  For example, instead of 'return SUCCESS' I just want to call another action... something like 'return SomeAction!doit.action.  Any ideas? Thanks in advance.
> _________________________________________________________________
> Windows Live Hotmail and Microsoft Office Outlook – together at last. Get it now.
> http://office.microsoft.com/en-us/outlook/HA102225181033.aspx?pid=CL100626971033


-- 
Wesley Wannemacher
President, Head Engineer/Consultant
WanTii, Inc.
http://www.wantii.com

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


Re: calling action

Posted by Dave Newton <ne...@yahoo.com>.
--- Henry Park <hs...@hotmail.com> wrote:
> How can I forward to a url from within my action
> class?  For example, instead of 'return SUCCESS' I
> just want to call another action... something like
> 'return SomeAction!doit.action.  Any ideas? Thanks
> in advance.

Define a result that either chains or redirects to the
action?

d.


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