对于struts2的Action的所抛的异常在inteceptor 中得到拦截可在struts.xml中配制全局变量
这里要注意result 必需写在exception-mappings前
<package name="bjsxt_2012" extends="struts-default" >
<global-results>
<result name="error">/error.jsp</result>
</global-results>
<global-exception-mappings>
<exception-mapping result="error" exception="java.lang.Exception"></exception-mapping>
</global-exception-mappings>
</package>
这里要注意result 必需写在exception-mappings前