<global-results>
<result name="showException">/register.jsp</result>
</global-results>
<!-- 在这个里面注册一个全局的Exception-->
<global-exception-mappings>
<exception-mapping result="showException" exception="java.lang.Exception">
</global-exception-mappings>
<!-- 在这个里面注册一个sql的Exception-->
<action name="register" class="action.RegisterException">
<result name="showException">/register.jsp</result>
<result name="success">/register.jsp</result>
<exception-mapping result="showException" exception="java.sql.SQLException"/>
</action>
注册异常
最新推荐文章于 2021-04-01 09:34:30 发布