⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 http_error.jsp

📁 java大型企业DRP系统源码带sql数据库
💻 JSP
字号:
<%@ page language="java" contentType="text/html; charset=GB18030"
    pageEncoding="GB18030"%>
<html>
<head>
<title>自定义的错误页</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
</head>
<body marginwidth="0" leftmargin="0" bgcolor="ffffff">

<table width="90%">
  <tbody>
    <tr>
      <td width="98%">
          自定义的错误页
      <hr>      </td>
    </tr>
    <tr>
      <td></td>
    </tr>
    <tr>
      <td>
<% 
      int status_code = -1;
      String exception_info = null;
      Exception theException = null;
      status_code = ((Integer) request.getAttribute("javax.servlet.error.status_code"));
      exception_info = (String) request.getAttribute("javax.servlet.error.message");
      theException = (Exception) request.getAttribute("javax.servlet.error.exception_type");
      if(status_code==404)        
        response.sendRedirect("404.jsp");
      if(status_code==500)                        
        response.sendRedirect("500.jsp");
      out.println("<br><b>StatusCode:</b> " +  status_code);
      out.println("<br><b>Exception:</b>" + exception_info);

%>     </TD>
    </TR>
  </TBODY>
</TABLE>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -