Преглед изворни кода

修复错误页面报错的问题

shuzheng пре 9 година
родитељ
комит
a727ec75a5

+ 2 - 2
zheng-api/zheng-api-server/src/main/webapp/WEB-INF/jsp/error.jsp

@@ -1,4 +1,4 @@
-<%@ page contentType="text/html; charset=utf-8"%>
+<%@ page contentType="text/html; charset=utf-8" isErrorPage="true"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
@@ -12,7 +12,7 @@
     <title><spring:message code="error"/></title>
     <title><spring:message code="error"/></title>
 </head>
 </head>
 <body>
 <body>
-<% Exception e = (Exception)request.getAttribute("ex"); %>
+<% Exception e = null != exception ? (Exception) exception : (Exception)request.getAttribute("ex"); %>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <hr />
 <hr />
 <h5>错误描述:</h5>
 <h5>错误描述:</h5>

+ 2 - 2
zheng-cms/zheng-cms-admin/src/main/webapp/WEB-INF/jsp/error.jsp

@@ -1,4 +1,4 @@
-<%@ page contentType="text/html; charset=utf-8"%>
+<%@ page contentType="text/html; charset=utf-8" isErrorPage="true"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
@@ -12,7 +12,7 @@
     <title><spring:message code="error"/></title>
     <title><spring:message code="error"/></title>
 </head>
 </head>
 <body>
 <body>
-<% Exception e = (Exception)request.getAttribute("ex"); %>
+<% Exception e = null != exception ? (Exception) exception : (Exception)request.getAttribute("ex"); %>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <hr />
 <hr />
 <h5>错误描述:</h5>
 <h5>错误描述:</h5>

+ 2 - 2
zheng-cms/zheng-cms-job/src/main/webapp/WEB-INF/jsp/error.jsp

@@ -1,4 +1,4 @@
-<%@ page contentType="text/html; charset=utf-8"%>
+<%@ page contentType="text/html; charset=utf-8" isErrorPage="true"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
@@ -12,7 +12,7 @@
     <title><spring:message code="error"/></title>
     <title><spring:message code="error"/></title>
 </head>
 </head>
 <body>
 <body>
-<% Exception e = (Exception)request.getAttribute("ex"); %>
+<% Exception e = null != exception ? (Exception) exception : (Exception)request.getAttribute("ex"); %>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <hr />
 <hr />
 <h5>错误描述:</h5>
 <h5>错误描述:</h5>

+ 2 - 2
zheng-cms/zheng-cms-search/src/main/webapp/WEB-INF/jsp/error.jsp

@@ -1,4 +1,4 @@
-<%@ page contentType="text/html; charset=utf-8"%>
+<%@ page contentType="text/html; charset=utf-8" isErrorPage="true"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
@@ -12,7 +12,7 @@
     <title><spring:message code="error"/></title>
     <title><spring:message code="error"/></title>
 </head>
 </head>
 <body>
 <body>
-<% Exception e = (Exception)request.getAttribute("ex"); %>
+<% Exception e = null != exception ? (Exception) exception : (Exception)request.getAttribute("ex"); %>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <hr />
 <hr />
 <h5>错误描述:</h5>
 <h5>错误描述:</h5>

+ 2 - 2
zheng-cms/zheng-cms-web/src/main/webapp/WEB-INF/jsp/error.jsp

@@ -1,4 +1,4 @@
-<%@ page contentType="text/html; charset=utf-8"%>
+<%@ page contentType="text/html; charset=utf-8" isErrorPage="true"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
@@ -12,7 +12,7 @@
     <title><spring:message code="error"/></title>
     <title><spring:message code="error"/></title>
 </head>
 </head>
 <body>
 <body>
-<% Exception e = (Exception)request.getAttribute("ex"); %>
+<% Exception e = null != exception ? (Exception) exception : (Exception)request.getAttribute("ex"); %>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <hr />
 <hr />
 <h5>错误描述:</h5>
 <h5>错误描述:</h5>

+ 2 - 2
zheng-oss/zheng-oss-web/src/main/webapp/WEB-INF/jsp/error.jsp

@@ -1,4 +1,4 @@
-<%@ page contentType="text/html; charset=utf-8"%>
+<%@ page contentType="text/html; charset=utf-8" isErrorPage="true"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
@@ -12,7 +12,7 @@
     <title><spring:message code="error"/></title>
     <title><spring:message code="error"/></title>
 </head>
 </head>
 <body>
 <body>
-<% Exception e = (Exception)request.getAttribute("ex"); %>
+<% Exception e = null != exception ? (Exception) exception : (Exception)request.getAttribute("ex"); %>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <hr />
 <hr />
 <h5>错误描述:</h5>
 <h5>错误描述:</h5>

+ 2 - 2
zheng-pay/zheng-pay-admin/src/main/webapp/WEB-INF/jsp/error.jsp

@@ -1,4 +1,4 @@
-<%@ page contentType="text/html; charset=utf-8"%>
+<%@ page contentType="text/html; charset=utf-8" isErrorPage="true"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
@@ -12,7 +12,7 @@
     <title><spring:message code="error"/></title>
     <title><spring:message code="error"/></title>
 </head>
 </head>
 <body>
 <body>
-<% Exception e = (Exception)request.getAttribute("ex"); %>
+<% Exception e = null != exception ? (Exception) exception : (Exception)request.getAttribute("ex"); %>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <hr />
 <hr />
 <h5>错误描述:</h5>
 <h5>错误描述:</h5>

+ 2 - 2
zheng-pay/zheng-pay-web/src/main/webapp/WEB-INF/jsp/error.jsp

@@ -1,4 +1,4 @@
-<%@ page contentType="text/html; charset=utf-8"%>
+<%@ page contentType="text/html; charset=utf-8" isErrorPage="true"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
@@ -12,7 +12,7 @@
     <title><spring:message code="error"/></title>
     <title><spring:message code="error"/></title>
 </head>
 </head>
 <body>
 <body>
-<% Exception e = (Exception)request.getAttribute("ex"); %>
+<% Exception e = null != exception ? (Exception) exception : (Exception)request.getAttribute("ex"); %>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <hr />
 <hr />
 <h5>错误描述:</h5>
 <h5>错误描述:</h5>

+ 2 - 2
zheng-ucenter/zheng-ucenter-home/src/main/webapp/WEB-INF/jsp/error.jsp

@@ -1,4 +1,4 @@
-<%@ page contentType="text/html; charset=utf-8"%>
+<%@ page contentType="text/html; charset=utf-8" isErrorPage="true"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
@@ -12,7 +12,7 @@
     <title><spring:message code="error"/></title>
     <title><spring:message code="error"/></title>
 </head>
 </head>
 <body>
 <body>
-<% Exception e = (Exception)request.getAttribute("ex"); %>
+<% Exception e = null != exception ? (Exception) exception : (Exception)request.getAttribute("ex"); %>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <hr />
 <hr />
 <h5>错误描述:</h5>
 <h5>错误描述:</h5>

+ 2 - 2
zheng-upms/zheng-upms-server/src/main/webapp/WEB-INF/jsp/error.jsp

@@ -1,4 +1,4 @@
-<%@ page contentType="text/html; charset=utf-8"%>
+<%@ page contentType="text/html; charset=utf-8" isErrorPage="true"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
@@ -12,7 +12,7 @@
 <title><spring:message code="error"/></title>
 <title><spring:message code="error"/></title>
 </head>
 </head>
 <body>
 <body>
-<% Exception e = (Exception)request.getAttribute("ex"); %>
+<% Exception e = null != exception ? (Exception) exception : (Exception)request.getAttribute("ex"); %>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <hr />
 <hr />
 <h5>错误描述:</h5>
 <h5>错误描述:</h5>

+ 2 - 2
zheng-wechat/zheng-wechat-mp/zheng-wechat-mp-admin/src/main/webapp/WEB-INF/jsp/error.jsp

@@ -1,4 +1,4 @@
-<%@ page contentType="text/html; charset=utf-8"%>
+<%@ page contentType="text/html; charset=utf-8" isErrorPage="true"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
 <%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
@@ -12,7 +12,7 @@
     <title><spring:message code="error"/></title>
     <title><spring:message code="error"/></title>
 </head>
 </head>
 <body>
 <body>
-<% Exception e = (Exception)request.getAttribute("ex"); %>
+<% Exception e = null != exception ? (Exception) exception : (Exception)request.getAttribute("ex"); %>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <h2>错误: <%= e.getClass().getSimpleName()%></h2>
 <hr />
 <hr />
 <h5>错误描述:</h5>
 <h5>错误描述:</h5>