日期:2014-05-19 浏览次数:20854 次
<package name="exceptionTest" extends="struts-default" namespace="/">
<global-results>
<result name="sql">/exception.jsp</result>
<result name="root">/exception.jsp</result>
</global-results>
<global-exception-mappings>
<exception-mapping result="sql" exception="java.sql.SQLException"></exception-mapping>
<exception-mapping result="root" exception="java.lang.Exception"></exception-mapping>
</global-exception-mappings>
<action name="exceptionTestAction" class="ExceptionTestAction">
<exception-mapping result="my"
exception="MyException"></exception-mapping>
<result name="my">/exception.jsp</result>
<result name="error">/error.jsp</result>
<result name="success">/welcome.jsp</result>
</action>
</package>