struts2 配置文件

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">


<struts>
<!-- 配置为开发模式 -->
<constant name="struts.devMode" value="true" />
<!-- 把扩展名配置为action -->
<constant name="struts.action.extension" value="action" />
<!-- 把主题配置为simple -->
<constant name="struts.ui.theme" value="simple" />
    


<package name="oa" namespace="/" extends="struts-default">

<interceptors>
<interceptor name="PrivilegeInterceptor" class="com.dfqf.oa.utils.PrivilegeInterceptor"></interceptor>
   <interceptor-stack name="defaultStack">
       <interceptor-ref name="PrivilegeInterceptor"/>
       <interceptor-ref name="defaultStack"/>
   </interceptor-stack>
</interceptors>

   <global-results>
       <result name="loginUI">/WEB-INF/jsp/userAction/loginUI.jsp</result>
<result name="logout">/WEB-INF/jsp/userAction/logout.jsp</result>
<result name="noPrivilege">/noPrivilegeError.jsp</result>
   </global-results>


<action name="test" class="testAction">
<result name="success">/test.jsp</result>
</action>
<!-- 配置测试用的Action,未与Spring整合,class属性写类的全名 -->
<!-- 当Struts2与Spring整合后,class属性可以写bean的名称 -->
<action name="role_*" class="roleAction" method="{1}">
<result name="list">/WEB-INF/jsp/roleAction/role_list.jsp</result>
<result name="saveUI">/WEB-INF/jsp/roleAction/role_saveUI.jsp</result>
<result name="tolist" type="redirectAction">role_list</result>
<result name="setPrivilegeUI">/WEB-INF/jsp/roleAction/setPrivilegeUI.jsp
</result>
</action>


<action name="department_*" class="departmentAction" method="{1}">
<result name="list">/WEB-INF/jsp/departmentAction/department_list.jsp
</result>
<result name="saveUI">/WEB-INF/jsp/departmentAction/department_saveUI.jsp
</result>
<result name="tolist" type="redirectAction">department_list?parentId=${parentId}
</result>
</action>


<action name="user_*" class="userAction" method="{1}">
<result name="list">/WEB-INF/jsp/userAction/list.jsp</result>
<result name="saveUI">/WEB-INF/jsp/userAction/saveUI.jsp</result>
<result name="tolist" type="redirectAction">user_list</result>
<result name="index" type="redirectAction">home_index</result>
</action>


<action name="home_*" class="homeAction" method="{1}">
<result name="toindex">/WEB-INF/jsp/homeAction/index.jsp</result>
<result name="toright">/WEB-INF/jsp/homeAction/right.jsp</result>
<result name="toleft">/WEB-INF/jsp/homeAction/left.jsp</result>
<result name="totop">/WEB-INF/jsp/homeAction/top.jsp</result>
<result name="tobottom">/WEB-INF/jsp/homeAction/bottom.jsp</result>
</action>


<action name="forumManage_*" class="forumManageAction" method="{1}">
<result name="list">/WEB-INF/jsp/forumManageAction/list.jsp</result>
<result name="saveUI">/WEB-INF/jsp/forumManageAction/saveUI.jsp</result>
<result name="tolist" type="redirectAction">forumManage_list</result>
<result name="moveDown" type="redirectAction">forumManage_list</result>
<result name="moveUp" type="redirectAction">forumManage_list</result>
</action>

<action name="forum_*" class="forumAction" method="{1}">
<result name="list">/WEB-INF/jsp/forumAction/list.jsp</result>
<result name="show">/WEB-INF/jsp/forumAction/show.jsp</result>
</action>

<action name="topic_*" class="topicAction" method="{1}">
<result name="addUI">/WEB-INF/jsp/topicAction/addUI.jsp</result>
<result name="show">/WEB-INF/jsp/topicAction/show.jsp</result>
<result name="toshow" type="redirectAction">forum_show?forumId=${forumId}</result>
</action>

<action name="reply_*" class="replyAction" method="{1}">
<result name="addUI">/WEB-INF/jsp/replyAction/addUI.jsp</result>
<result name="toshow" type="redirectAction">topic_show?id=${topicId}</result>
</action>

</package>


<!-- Add packages here -->


</struts>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值