struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bOOyah <boo...@nowhere.org>
Subject Re: How to forward from one LookupDispatchAction to another LDA
Date Fri, 23 Apr 2004 16:43:08 GMT
Riyad Kalla wrote:

> UPDATE:
> Upgraded my Struts install to nightly build and now the code snippet 
> below works. I'm still curious if anyone knows how one LDA can forward 
> to another (or the same) LDA, even if it takes manually setting the 
> parameter value (how?)

<snip />

>> protected ActionForward unspecified(
>>       ActionMapping mapping,
>>       ActionForm form,
>>       HttpServletRequest request,
>>       HttpServletResponse response)
>>       throws Exception
>>   {
>>       return showList(mapping, form, request, response);
>>   }

I have also used this in the past, but without execution errors (I'm 
using Struts 1.1 stable).  But as you've rightly spotted, you are 
limited to only being able to forward to another method in the same Action.

I, too, felt this was an 'ugly' solution because the Struts Controller 
is bypassed and you cannot change your mind about unchaining those 
actions without editing Java.  I read somewhere authoritative that 
ActionForward was created for just this purpose; you chain the actions 
in the Struts config file instead.

However, chaining actions programmatically could be a perfectly valid 
thing to do though...I've only been using Struts for three months ;-)

-- 
bOOyah


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


Mime
View raw message