DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "" >
<struts>
<include file="struts-default.xml">include>
<package name="com.kay.struts2" extends="struts-default" namespace="/test">
<interceptors>
<interceptor name="timer" class="com.kay.timer">interceptor>
<interceptor name="logger" class="com.kay.logger">interceptor>
<interceptor-stack name="mystack">
<interceptor-ref name="timer">interceptor-ref>
<interceptor-ref name="logger">interceptor-ref>
interceptor-stack>
interceptors>
<default-interceptor-ref name="mystack">default-interceptor-ref>
<global-results>
<result name="input">/error.jspresult>
global-results>
<action name="hello" class="com.kay.struts2.Action.LoginAction">
<interceptor-ref name="timer">interceptor-ref>
<result name="success" type="dispatcher">/talk.jspresult>
<param name="url">param>
action>
package>
struts>
个人感觉 这个包就跟类包的概念是一样的。用来组织Action与拦截器用的!
阅读(775) | 评论(0) | 转发(0) |