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

changeset 47
57cfb94ab99f
parent 46
1574965c7dc7
child 70
821c4950b619
--- a/src/main/webapp/WEB-INF/jsp/site.jsp	Wed May 13 21:46:26 2020 +0200
+++ b/src/main/webapp/WEB-INF/jsp/site.jsp	Thu May 14 22:48:01 2020 +0200
@@ -31,7 +31,7 @@
 <%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
 
 <%-- Make the base href easily available at request scope --%>
-<c:set scope="request" var="baseHref" value="${pageContext.request.scheme}://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.request.contextPath}/" />
+<c:set scope="page" var="baseHref" value="${requestScope[Constants.REQ_ATTR_BASE_HREF]}" />
 
 <%-- Define an alias for the request path --%>
 <c:set scope="page" var="requestPath" value="${requestScope[Constants.REQ_ATTR_PATH]}"/>
@@ -45,6 +45,9 @@
 <%-- Define an alias for the fragment name --%>
 <c:set scope="page" var="fragment" value="${requestScope[Constants.REQ_ATTR_FRAGMENT]}"/>
 
+<%-- Define an alias for the optional redirect location --%>
+<c:set scope="page" var="redirectLocation" value="${requestScope[Constants.REQ_ATTR_REDIRECT_LOCATION]}"/>
+
 <%-- Define an alias for the additional stylesheet --%>
 <c:set scope="page" var="extraCss" value="${requestScope[Constants.REQ_ATTR_STYLESHEET]}"/>
 
@@ -66,6 +69,9 @@
             </fmt:bundle>
         </title>
         <meta charset="UTF-8">
+        <c:if test="${not empty redirectLocation}">
+        <meta http-equiv="refresh" content="0; URL=${redirectLocation}">
+        </c:if>
         <link rel="stylesheet" href="lightpit.css" type="text/css">
         <c:if test="${not empty extraCss}">
         <link rel="stylesheet" href="${extraCss}" type="text/css">
@@ -87,6 +93,7 @@
         <div id="content-area">
             <c:if test="${not empty fragment}">
                 <fmt:setBundle scope="request" basename="${moduleInfo.bundleBaseName}"/>
+                <fmt:setBundle scope="request" var="lightpit_bundle" basename="localization.lightpit"/>
                 <c:import url="${fragment}" />
             </c:if>
         </div>

mercurial