struts2 actionchaining

(1)<action name="actionChain2" class="org.apache.struts2.showcase.actionchaining.ActionChain2">
   <result type="chain">actionChain3</result>
  </action>
  <action name="actionChain3" class="org.apache.struts2.showcase.actionchaining.ActionChain3">
   <result>/actionchaining/actionChainingResult.jsp</result>
  </action>

访问actionChain2成功的话,就会执行另一个Action(actionChain3)最后到jsp页面。

(2)

public class ActionChain3 extends ActionSupport {

     private String actionChain2Property1; 对于type=chain的转到的下一个Action必须包括上一个action的属性
    private String actionChain3Property1 = "Property set in Action Chain 3";
}

public class ActionChain2 extends ActionSupport {

      private String actionChain2Property1 = "Property Set in Action Chain 2";

-----------------

你可能感兴趣的:(apache,jsp)