struts2.xml

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

<struts>
<!-- 上传文件的大小 -->
<constant name="struts.multipart.maxSize" value="102400000"></constant>
<constant name="struts.configuration.xml.reload" value="true" />
<package name="default" namespace="/" extends="struts-default">
<interceptors>
<interceptor name="helloInterceptor" class="cn.xxx.struts2.interceptor.HelloInterceptor"></interceptor>
<interceptor-stack name="myStack">
<interceptor-ref name="defaultStack" />
<interceptor-ref name="helloInterceptor" />
</interceptor-stack>
</interceptors>
<action name="user_*" class="cn.xxx.struts2.action.UserAction" method="{1}">
<result name="{1}" >/WEB-INF/jsp/{1}.jsp</result>
<!--
<result name="addInput" >/WEB-INF/jsp/addInput.jsp</result>
<result name="add" >/WEB-INF/jsp/add.jsp</result>
<result name="list" >/WEB-INF/jsp/list.jsp</result>
<result name="success">/WEB-INF/jsp/success.jsp</result>
-->
</action>
<action name="msg_*" class="cn.xxx.struts2.action.MessageAction" method="{1}">
<interceptor-ref name="myStack" />
<result name="success" >/WEB-INF/message/fileUpload.jsp</result>
<result name="{1}" >/WEB-INF/message/{1}.jsp</result>
</action>
</package>
</struts>

你可能感兴趣的:(struts)