这是struts2xml文件 配置 标红的部分是动态页面的地址
<!-- 编辑页 -->
<action name="editPageAction" method="executeEditPage" class="zxteditPageAction">
<result name="preview-editPage" >/common/jsp/easyui/preview-editPage.jsp</result>
<result name="load-editPage" >/common/jsp/easyui/edit-load.jsp</result>
<result name="load-copyPage" >/common/jsp/easyui/copy-load.jsp</result>
<result name="loadTabEditPage" >/common/jsp/easyui/loadTab-edit.jsp</result>
<result name="curingPage" >/${pageUrl}</result>
</action>
这个功能还是比较好用的灵活性也比较高。这里要求绿色部分pageUrl是action类的变量。
我们只需在action中为pageUrl变量赋予动态的值,便可实现页面的动态化