--- a/src/main/webapp/WEB-INF/dynamic_fragments/error.jsp Wed May 13 21:10:23 2020 +0200 +++ b/src/main/webapp/WEB-INF/dynamic_fragments/error.jsp Wed May 13 21:46:26 2020 +0200 @@ -28,10 +28,10 @@ <%@page import="de.uapcore.lightpit.modules.ErrorModule" %> <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> - -<jsp:useBean id="exception" scope="request" type="java.lang.Throwable"/> +<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> <c:set scope="page" var="errorCode" value="${requestScope[ErrorModule.REQ_ATTR_ERROR_CODE]}"/> +<c:set scope="page" var="returnLink" value="${requestScope[ErrorModule.REQ_ATTR_RETURN_LINK]}"/> <div id="error-page"> <h1><fmt:message key="h1"/></h1> @@ -48,11 +48,18 @@ <th><fmt:message key="errorTimestamp" />:</th> <td><fmt:formatDate type="both" value="<%= new java.util.Date()%>"/></td> </tr> + <%--@elvariable id="exception" type="java.lang.Exception"--%> <c:if test="${not empty exception}"> <tr> <th><fmt:message key="errorExceptionText" />:</th> <td>${exception.class.name} - ${exception.message}</td> </tr> </c:if> + <c:if test="${fn:startsWith(returnLink, baseHref)}"> + <tr> + <th><fmt:message key="errorReturnLink" />:</th> + <td><a href="${returnLink}">${returnLink}</a></td> + </tr> + </c:if> </table> </div>