struts.xml代码:
<interceptors>
<interceptor name="myExceptionInterceptor" class="com.interceptor.ExceptionInterceptor"></interceptor>
<interceptor-stack name="mydefault">
<!-- 必须加上默认的拦截器,否则不会为依赖注入action属性值 -->
<interceptor-ref name="defaultStack"></interceptor-ref>
<!-- 默认的拦截器必须在第一位,否则会报错不会进入异常指定结果页面-->
<interceptor-ref name="myExceptionInterceptor" />
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="mydefault" />
<global-results>
<result name="basicEx">/exception.jsp</result>
</global-results>
<global-exception-mappings>
<exception-mapping result="basicEx" exception="com.exception.MyException"></exception-mapping>
</globa