But I want to keep request of action1 in action2 in order that in action2 I 
want get these attribute which is setAttribute in action1. If use 
actionRedirect it will new request!

-----Original Message-----
From: Lukasz Lenart [mailto:lukaszlen...@apache.org] 
Sent: Dienschdàà 28 März 2017 14:41
To: Struts Users Mailing List
Subject: Re: Pass a parameter from action to other action with type result 
"chain"

2017-03-27 10:25 GMT+02:00 Dao Cong Hung (FSU17.BU68)
<hun...@fsoft.com.vn.invalid>:
> -------------------------I convert struts1 to 
> struts2-----------------------------------
> -------------------------Struts1: 
> ----------------------------------------
> <action path="action1 "
>                 
> type="jp.co.fujixerox.eappli.printapp.struts.PostLauncherAction1">
>         <forward name="error"      path="/ action2.do?name=close " />
>     </action>
> <action path="action2 "
>                 
> type="jp.co.fujixerox.eappli.printapp.struts.PostLauncherAction2">
>         <forward   name="success"    path">/jsp/showResult/success.jsp " />
>     </action>
> =>So at controller of action2 in class PostLauncherAction2, I use 
> request.getParameters("name")=close;
> ------------------------------Struts2---------------------------------
> ------------
> <action name="action1"
>                     
> class="jp.co.fujixerox.eappli.printapp.struts.PostLauncherAction1">
>                          <result name="error" type="chain">
>                                  <param name="actionName">action2</param>
>                                  <param name="name">close</param>
>                         </result>
>  </action>
>  <action name="action2"
>                          
> class="jp.co.fujixerox.eappli.printapp.struts.PostLauncherAction2">
>                         <result
>  name="success">/jsp/showResult/success.jsp</result>
>  </action>
>> So at controller of action2 in class PostLauncherAction2, I use 
>> request.getParameters("name")=null;

I would use rather the "actionRedirect" result instead of the "chain" result 
https://struts.apache.org/docs/redirect-action-result.html


Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/

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


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

Reply via email to