以下页面将产生一个例外:
<%@ 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>
Java Asp PHP .Net XML C/C++ CGI VB Jsp J2ee J2se J2me EJB Servlet Tomcat Resin Struts Weblogic Eclipse ANT GUI JMS Web servise IDEA Webphere Hibernate Spring Jboss Applet Swing Socket Javamail Perl Ajax P2P 安全 模式 框架 测试 开源 游戏
Windows XP Windows 2000 Windows 2003 Windows Me Windows 9.x Linux UNIX 注册表 操作系统 服务器 应用服务器