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

📄 errorpage.jsp

📁 一个用于嵌入式的Mini Web Server.大小只有200k. 非常适合用于机顶盒等.
💻 JSP
字号:
<%@ page contentType="text/html; charset=GBK"%>
<%@ page isErrorPage="true" %>
<%@ page import="com.wellhope.gateway.GWException" %>
<html>
<head>
<title>认证网关错误页面</title>
<style>
TABLE
{
    FONT-FAMILY: "宋体";
    FONT-SIZE: 9pt;
	COLOR:  #003333
}
TD
{
    FONT-FAMILY: "宋体";
    FONT-SIZE: 10pt;
	COLOR:  #003333 
}
</style>
</head>

<body>
<p align="center"><font color="#003333"  style="FONT-SIZE: 12pt"><b> <br>
  <br>
  <br>
  <br>
  错误信息</b></font><br>
  <br>
  <%
  String errorCode = null;
  String errorMsg = "";
  String errorHandle = "";
  String queryCode = null;
//获得错误信息
  if(request.getParameter("errorCode")!=null ){
    queryCode = request.getParameter("errorCode");
    GWException gwEx = new GWException(queryCode);
    errorMsg = gwEx.getErrorMsg();
    errorHandle = gwEx.getHandle();
    errorCode = gwEx.getErrorCode();

  }
  else if ((exception != null) && (exception instanceof GWException))
  {

    errorCode = ((GWException)exception).getErrorCode();
    errorMsg = ((GWException)exception).getErrorMsg();
    errorHandle = ((GWException)exception).getHandle();
    queryCode = errorCode;
  }

  if(errorCode!=null){
%>
<table width="45%"  border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#999999">
  <tr> 
    <td width="20%" height="26" >错误代码:</td>
    <td width="80%" >&nbsp;<%=queryCode%></td>
  </tr>
  <tr> 
    <td height="26">错误描述:</td>
    <td>&nbsp;<%=errorMsg%></td>
  </tr>
  <tr> 
    <td height="26">处理建议:</td>
    <td>&nbsp;<%=errorHandle%></td>
  </tr>
</table>

<%
   }else{
%>



<br>
<table width="45%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#999999">
  <tr> 
    <td width="20%" height="26">错误描述:</td>
    <td width="80%">&nbsp;出现未知错误, 
      <%
      if (exception!=null){
        out.print("异常信息如下:<br>"+exception.getMessage());
        errorCode = "0";

      }else{
        out.print("无相关异常信息");
      }
     %>
    </td>
  </tr>
  <tr> 
    <td height="26">处理建议:</td>
    <td>&nbsp;联系系统管理员检查系统</td>
  </tr>
</table>

<%
  }
%>
</body>
</html>

⌨️ 快捷键说明

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