struts2 错误拦截器配置

来源:互联网 发布:快手伴奏软件下载 编辑:程序博客网 时间:2024/04/30 23:20

配置

<global-results>
<result name="error">/chapterFour/Error.jsp</result>
</global-results>
<global-exception-mappings>
<exception-mapping exception="java.lang.Exception" result="error"/>
</global-exception-mappings>

 

错误提示界面

<p><h4>Exception Name: </h4><s:property value="exception" /></p>
<p><h4>What you did wrong:</h4> <s:property value="exceptionStack" /></p>
<p><h5>Also, please confirm that your Internet is working before actually
contacting us.</h4></p>

原创粉丝点击