error.jsp
来自「使用jsp和servlet开发的论坛」· JSP 代码 · 共 49 行
JSP
49 行
<%@ page contentType="text/html;charset=GB2312" %>
<%@ page import="java.io.*,
java.util.*,
java.net.*,
com.jivesoftware.forum.*"
isErrorPage="true"
%>
<% // Do a check to see what type of exception the exception variable is.
// If it's an UnauthorizedException, redirect to the login page
if (exception instanceof UnauthorizedException) {
response.sendRedirect("login.jsp?unauth=true");
return;
}
%>
<html>
<head>
<title>错误页面</title>
</head>
<body>
<font face="arial,helvetica,sans-serif">
<b>论坛: <%= JiveGlobals.getJiveVersion() %></b>
<hr size="0">
<font size="-1">
下面有错误发生,请将错误报告到:
<a href="<%=JiveGlobals.getJiveProperty("websiteconf.name")%>" target="_blank"><%=JiveGlobals.getJiveProperty("websiteconf.name")%></a>
</font>
</font>
<% exception.printStackTrace();
StringWriter sout = new StringWriter();
PrintWriter pout = new PrintWriter(sout);
exception.printStackTrace(pout);
%>
<pre>
<%= sout.toString() %>
</pre>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?