Improve output: distinguish between failed assertions (failures) and unexpected exceptions (errors), and print a filtered stack trace for any exception.
This commit is contained in:
commit
4f2e303079
1839 changed files with 235630 additions and 0 deletions
3
webapp/web/templates/error/entityNotFound.jsp
Normal file
3
webapp/web/templates/error/entityNotFound.jsp
Normal file
|
@ -0,0 +1,3 @@
|
|||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
||||
|
||||
<div class="error"><h4>No matching entity was found in the system.</h4> </div>
|
18
webapp/web/templates/error/error404.jsp
Normal file
18
webapp/web/templates/error/error404.jsp
Normal file
|
@ -0,0 +1,18 @@
|
|||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
||||
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@page isErrorPage="true" %>
|
||||
|
||||
<% if ( pageContext.getErrorData().getRequestURI().indexOf("/images/") < 0 ) {
|
||||
request.setAttribute("bodyJsp", "/templates/error/error404content.jsp");
|
||||
request.setAttribute("title", "Not Found");
|
||||
%>
|
||||
|
||||
<jsp:forward page="/templates/page/basicPage.jsp">
|
||||
<jsp:param name="uriStr" value="${pageContext.errorData.requestURI}"/>
|
||||
</jsp:forward>
|
||||
|
||||
<% } %>
|
||||
|
||||
|
||||
|
21
webapp/web/templates/error/error404content.jsp
Normal file
21
webapp/web/templates/error/error404content.jsp
Normal file
|
@ -0,0 +1,21 @@
|
|||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
||||
|
||||
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %><%/* this odd thing points to something in web.xml */ %>
|
||||
<div class="contents">
|
||||
|
||||
<h1>Page Not Found</h1>
|
||||
|
||||
<p class="warning">The page you requested is not available. It may have been deleted or moved to another location.</p>
|
||||
|
||||
<p>Try the search box above to locate the information you are looking for.</p>
|
||||
|
||||
<p>If you reached this page by following a link within this website, please consider <a href="<c:url value="comments"/>">contacting us</a> and telling us what link you clicked.</p>
|
||||
|
||||
<!-- _______________________________Exception__________________________________
|
||||
|
||||
404
|
||||
Request URI: ${param.uriStr}
|
||||
___________________________________________________________________________ -->
|
||||
|
||||
</div><!-- contents -->
|
||||
|
44
webapp/web/templates/error/error500.jsp
Normal file
44
webapp/web/templates/error/error500.jsp
Normal file
|
@ -0,0 +1,44 @@
|
|||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
||||
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<%@ page import="java.lang.Integer" %>
|
||||
<%@page isErrorPage="true" %>
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>Internal Server Error</title>
|
||||
</head>
|
||||
|
||||
<body style="margin:2%;font-family:Arial, Helvetica, sans-serif;">
|
||||
<div class="contents">
|
||||
|
||||
<h1>Internal Server Error</h1>
|
||||
|
||||
<p style="color:red;">An internal error has occurred in the server.</p>
|
||||
|
||||
<p>Please try again later.</p>
|
||||
|
||||
<p>If the problem persists, please consider <a href="<c:url value="comments"/>">contacting us</a> and telling us how you arrived here.</p>
|
||||
|
||||
</div><!-- contents -->
|
||||
|
||||
<div id="hiddenErrorDiv" style="display:none;">
|
||||
_______________________________Exception__________________________________
|
||||
|
||||
500
|
||||
Request URI: ${param.uriStr}
|
||||
Exception: ${param.errStr}
|
||||
Stack trace:
|
||||
<c:forEach var="trace" items="${pageContext.exception.stackTrace}">
|
||||
${trace} <%="\n"%>
|
||||
</c:forEach>
|
||||
___________________________________________________________________________
|
||||
|
||||
</div><!-- hiddenErrorDiv -->
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
27
webapp/web/templates/error/error500content.jsp
Normal file
27
webapp/web/templates/error/error500content.jsp
Normal file
|
@ -0,0 +1,27 @@
|
|||
<%-- $This file is distributed under the terms of the license in /doc/license.txt$ --%>
|
||||
|
||||
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
|
||||
<div class="contents">
|
||||
|
||||
<h1>Internal Server Error</h1>
|
||||
|
||||
<p class="warning">An internal error has occurred in the server</p>
|
||||
|
||||
<p>Please try again later.</p>
|
||||
|
||||
<p>If the problem persists, please consider <a href="<c:url value="comments"/>">contacting us</a> and telling us how you arrived here.</p>
|
||||
|
||||
<!-- _______________________________Exception__________________________________
|
||||
|
||||
500
|
||||
Request URI: ${param.uriStr}
|
||||
Exception: ${param.errStr}
|
||||
Stack trace:
|
||||
<c:forEach var="trace" items="${pageContext.exception.stackTrace}">
|
||||
${trace} <%="\n"%>
|
||||
</c:forEach>
|
||||
___________________________________________________________________________ -->
|
||||
|
||||
</div><!-- contents -->
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue