当前位置: 移动技术网 > IT编程>开发语言>Java > JSP的出错处理

JSP的出错处理

2017年12月12日  | 移动技术网IT编程  | 我要评论
以下页面将产生一个例外: <%@ page errorpage="errorpge.jsp" %> <html> <hea
以下页面将产生一个例外:

<%@ page errorpage="errorpge.jsp" %>
<html>
<head>
<title>jsp 1.0 error page demo</title>
</head>
<body>
<h1>jsp 1.0 error page demo</h1>
<%
string s = null;
s.getbytes(); //这将给出 nullpointexception例外
%>
</body>
</html>


在出错后以下页面被调用:


<html>
<body bgcolor="black" text="#ffffff">
<%--@ page iserrorpage="true" --%>
<h1> attenion the fellowing error occurs</h1><br>
<pre><%= exception.getmessage() %></pre>
</body>

</html>

如您对本文有疑问或者有任何想说的,请 点击进行留言回复,万千网友为您解惑!

相关文章:

验证码:
移动技术网