struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Baroukh <mbaro...@cardiweb.com>
Subject Re: [S2] forward to another action
Date Thu, 01 Mar 2007 22:37:45 GMT
 >Why not just configure the target action in your action mapping as normal?

Does it work for you ? Not for me : 404 Not Found.
And this is, I suppose, because Struts2 use filter instead of servlet.
I also tried by addin <dispatcher>FORWARD</dispatcher> as I saw 
somewhere but still no luck.

But maybe is it with my appserver : Resin. Do you have another result 
with tomcat ?

Mike


Laurie Harper a écrit :
> Mike Baroukh wrote:
>>
>> I can't figure how to do this.
>> Can somebody help me ????
>>
>> I wan't to forward an action to another with something like
>> requestDispatcher("/action.do?param1=value1").forward(req, res);
>>
>> - I can't use redirect because I wan't to use the same request scope.
>> - I can't use chain because chain doesn't allow to add parameters.
>> - I can't use dispatcher because *.do is mapped to a filter and not a 
>> servlet. The application server doesn't find servlet to forward to 
>> (Result in file not found ...)
>> - I wan't to call again interceptor stack
>>
>> So, please, how do you resolve this case ???
>> Why having deleted the ServletAction that was in WW ????
>
> So you're using Struts2? Why not just configure the target action in 
> your action mapping as normal? Roughly,
>
>   <action ...>
>     <result name="blah">/action.do?param1=value1</result>
>     ...
>   </action>
>
> If 'value1' isn't static, you can use the ${expr} form to resolve it 
> against the value stack.
>
> L.
>
>
> ---------------------------------------------------------------------
> 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


Mime
View raw message