话不多说,直接贴代码:
public class TestAction { private String nextPage;//保存下一步内容的属性 public String destroy(){ if(user.dontConfirm()){//决定下一步 nextPage = LIST_PAGE; }else{ nextPage = CONFIRM_PAGE; } return DESTROY; } public String getNextPage(){//用于动作映射工作流的方法 return nextPage; } }
<action name="TestAction_*" method="{1}" class="TestAction"> <result name="destroy">${nextPage}</result> </action>
原文:http://blog.csdn.net/coslay/article/details/32909193