12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- <%@page import="java.io.PrintWriter"%>
- <%@page import="java.io.StringWriter"%><html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>错误500</title>
- <style type="text/css">
- a:link,a:active,a:visited {
- color: blue, text-decoration : underline
- }
-
- a:hover {
- color: red;
- text-decoration: none
- }
- </style>
- </head>
- <body style="margin: 200px 0px 0px 0px">
- <div align="center">
- <img align="absmiddle"
- src="<%=request.getContextPath()%>/resource/images/logo_gray1.gif"
- border="0" />
- </div>
- <div align="center"
- style="font-weight: bold; color: red; padding: 40px">
- 提示您:服务器发生内部错误!
- </div>
- <div align="center" style="font-size: 10pt">
- 您可以选择:
- <a href="javascript:location.reload()">刷新</a>
- <a href="javascript:history.back()">返回</a>
- </div>
- <div style="padding: 30px">
- <%
- if (request.getRemoteAddr().equals(request.getLocalAddr())) {
- Exception ex = (Exception) request
- .getAttribute("javax.servlet.error.exception");
- if (ex != null) {
- pageContext
- .getServletContext()
- .log(
- new StringBuilder().append("IP:").append(
- request.getRemoteAddr()).append(
- ",Path:").append(request.getRequestURI()).toString(), ex);
- %>
- <hr />
- <h3>
- 错误信息:
- </h3>
- <p>
- <%=ex.getMessage()%>
- </p>
- <hr />
- <h3>
- 错误堆栈:
- </h3>
- <p>
- <%
- StringWriter sw = new StringWriter();
- ex.printStackTrace(new PrintWriter(sw));
- sw.close();
- out.println(sw.toString().replace("\n", "<br/>"));
- %>
- </p>
- <%
- }
- }
- %>
- </div>
- </body>
- </html>
|