JSP--Error错误页设置,声明式异常--188 drp

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了JSP--Error错误页设置,声明式异常--188 drp相关的知识,希望对你有一定的参考价值。

xml配置:

<error-page>
		<exception-type>com.bjpowernode.drp.util.ApplicationException</exception-type>
		<location>/error.jsp</location>
</error-page>

 

jsp配置:

<%@ page contentType="text/html;charset=GB18030" %> 
<!-- 引入这个才能使用错误页信息 --> <%@ page isErrorPage="true" %> <html> <head> <title>错误信息!</title> <meta http-equiv="content-type" content="text/html;charset=gb2312"> <style type="text/css"> <!-- .STYLE1 { font-size: 24px; font-weight: bold; color: #FF0000; } --> </style> </head> <body> <br> <br> <center> <table width="500"> <tr> <td align="center"><p align="left"><span class="STYLE1">错误信息:</span></td> </tr> </table> <hr> <table width="500"> <tr> <td>
        <!-- 获取Exception的信息 --> <%=exception.getMessage()%></td> </tr> <tr> <td align="center" colspan="2"> <p> <input type="button" name="goback" value="返回" onClick="javascript:history.go(-1);"> </td> </tr> <tr> <td align="right" colspan="2"></td> </tr> <tr> <td align="right" colspan="2"></td> </tr> </table> </center> </body> </html>

 

以上是关于JSP--Error错误页设置,声明式异常--188 drp的主要内容,如果未能解决你的问题,请参考以下文章

Struts2声明式异常处理

声明式事务的介绍

Struts2学习第八课 声明式异常处理

HSQLDB CREATE TRIGGER 抛出异常:声明中错误或缺少数据影响子句:MODIFIES SQL

spring 声明式事务中try catch捕获异常

spring学习笔记(22)声明式事务配置,readOnly无效写无异常