src/main/webapp/WEB-INF/jsp/error.jsp

Wed, 06 Jan 2021 15:39:56 +0100

author
Mike Becker <universe@uap-core.de>
date
Wed, 06 Jan 2021 15:39:56 +0100
changeset 180
009700915269
parent 74
91d1fc2a3a14
child 184
e8eecee6aadf
permissions
-rw-r--r--

merge resource bundles

universe@13 1 <%--
universe@13 2 DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
universe@13 3
universe@180 4 Copyright 2021 Mike Becker. All rights reserved.
universe@13 5
universe@13 6 Redistribution and use in source and binary forms, with or without
universe@13 7 modification, are permitted provided that the following conditions are met:
universe@13 8
universe@13 9 1. Redistributions of source code must retain the above copyright
universe@13 10 notice, this list of conditions and the following disclaimer.
universe@13 11
universe@13 12 2. Redistributions in binary form must reproduce the above copyright
universe@13 13 notice, this list of conditions and the following disclaimer in the
universe@13 14 documentation and/or other materials provided with the distribution.
universe@13 15
universe@13 16 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
universe@13 17 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
universe@13 18 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
universe@13 19 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
universe@13 20 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
universe@13 21 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
universe@13 22 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
universe@13 23 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
universe@13 24 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
universe@13 25 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
universe@13 26 --%>
universe@39 27 <%@page pageEncoding="UTF-8" %>
universe@47 28 <%@page import="de.uapcore.lightpit.Constants" %>
universe@18 29 <%@page import="de.uapcore.lightpit.modules.ErrorModule" %>
universe@13 30 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
universe@13 31 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
universe@46 32 <%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
universe@39 33
universe@72 34 <c:set scope="page" var="baseHref" value="${requestScope[Constants.REQ_ATTR_BASE_HREF]}"/>
universe@53 35 <c:set scope="page" var="errorCode" value="${requestScope['javax.servlet.error.status_code']}"/>
universe@46 36 <c:set scope="page" var="returnLink" value="${requestScope[ErrorModule.REQ_ATTR_RETURN_LINK]}"/>
universe@13 37
universe@18 38 <div id="error-page">
universe@180 39 <h1><fmt:message key="error.headline"/></h1>
universe@18 40 <table>
universe@18 41 <tr>
universe@180 42 <th><fmt:message key="error.code"/>:</th>
universe@180 43 <td>${errorCode} - <fmt:message key="error.code.${errorCode}"/></td>
universe@18 44 </tr>
universe@18 45 <tr>
universe@180 46 <th><fmt:message key="error.message"/>:</th>
universe@53 47 <td><c:out value="${requestScope['javax.servlet.error.message']}"/></td>
universe@18 48 </tr>
universe@18 49 <tr>
universe@180 50 <th><fmt:message key="error.timestamp"/>:</th>
universe@18 51 <td><fmt:formatDate type="both" value="<%= new java.util.Date()%>"/></td>
universe@18 52 </tr>
universe@46 53 <%--@elvariable id="exception" type="java.lang.Exception"--%>
universe@18 54 <c:if test="${not empty exception}">
universe@72 55 <tr>
universe@180 56 <th><fmt:message key="error.exceptionText"/>:</th>
universe@72 57 <td>${exception['class'].name} - ${exception.message}</td>
universe@72 58 </tr>
universe@18 59 </c:if>
universe@46 60 <c:if test="${fn:startsWith(returnLink, baseHref)}">
universe@72 61 <tr>
universe@180 62 <th><fmt:message key="error.returnLink"/>:</th>
universe@72 63 <td><a href="${returnLink}">${returnLink}</a></td>
universe@72 64 </tr>
universe@46 65 </c:if>
universe@18 66 </table>
universe@18 67 </div>

mercurial