struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Ashley" <rick_r_ash...@hotmail.com>
Subject Re: Getting reference to ActionForward dynamically how?????
Date Tue, 11 Mar 2003 23:08:39 GMT
The problem in my case is that I can not hardcode that ActionForward's name 
(a generic solution) which in this case was: "frontpage".

Like I mentioned in other mail creating a new ActionForward instance
and returning it in Action's execute method causes a recursion :(
I'm using Tiles so, could it cause recursion problems in my kind of case?

br

>From: Dirk Markert <postfach-4711@gmx.de>
>Reply-To: Dirk Markert <postfach-4711@gmx.de>
>To: "Struts Users Mailing List" <struts-user@jakarta.apache.org>
>Subject: Re: Getting reference to ActionForward dynamically how?????
>Date: Tue, 11 Mar 2003 16:57:54 +0100
>
>Hello Rick,
>
>
>
>Tuesday, March 11, 2003, 4:48:29 PM, you wrote:
>
>RA> Hello,
>
>RA> Is it possible to get reference to ActionForward object dynamically,
>RA> not by giving findForward method it's name?
>
>RA> If Struts-config.xml is following:
>
>RA> <global-forwards>
>RA>         <forward name="frontpage" 
>path="/app/login.do?method=showpage"/>
>
>RA> Can I get name frontpage dynamically not hardcoded or is it possible
>RA> to use /app/login to create a new ActionForward instance?
>RA> Something like
>
>RA> return new ActionForward("/app/login");
>
>Try something like:
>
>  <global-forwards>
>          <forward name="frontpage" path="/app/login.do"/>
>
>ActionForward forward = new 
>ActionForward(mapping.findForward("frontpage").getPath());
>
>Then use
>    ConvertUtils
>from Struts-Scaffold to add your param.
>
>RA> - br
>
>
>
>
>
>RA> _________________________________________________________________
>RA> Surf together with new Shared Browsing
>RA> 
>http://join.msn.com/?page=features/browse&pgmarket=en-gb&XAPID=74&DI=1059
>
>
>RA> ---------------------------------------------------------------------
>RA> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>RA> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
>--
>Best regards,
>Dirk
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org


_________________________________________________________________
Stay in touch with MSN Messenger http://messenger.msn.co.uk


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


Mime
View raw message