class="java" name="code"><package name="abstract_struts" abstract="true"
extends="struts-default" namespace="/">
<interceptors>
<interceptor-stack name="myStack">
<interceptor-ref name="defaultStack"></interceptor-ref>
<interceptor-ref name="auth"></interceptor-ref>
<interceptor-ref name="log"></interceptor-ref>
</interceptor-stack>
<interceptor name="auth" class="org.philwong.core.util.AuthInterceptor" />
<interceptor name="log" class="org.philwong.core.util.LogInterceptor"/>
</interceptors>
<default-interceptor-ref name="myStack" />
<global-results>
<result name="login">/platform/common/tologin.jsp</result>
<result name="tologin">/platform/common/login.jsp</result>
<result name="noauth" type="redirect">
/include/noauth.jsp
</result>
</global-results>
</package>
首先在struts.xml中配置一个
全局的package继承struts-default,命名为abstract_struts,然后在别的配置文件继承这个abstract_struts
<package name="sysDept" extends="abstract_struts" namespace="/">