Sat, 23 May 2020 13:52:04 +0200
bloat removal 2/3 - moduleInfo
1.1 --- a/src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java Sat May 23 13:34:41 2020 +0200 1.2 +++ b/src/main/java/de/uapcore/lightpit/AbstractLightPITServlet.java Sat May 23 13:52:04 2020 +0200 1.3 @@ -58,10 +58,6 @@ 1.4 1.5 private static final String SITE_JSP = Functions.jspPath("site"); 1.6 1.7 - /** 1.8 - * The EL proxy is necessary, because the EL resolver cannot handle annotation properties. 1.9 - */ 1.10 - private LightPITModule.ELProxy moduleInfo = null; 1.11 1.12 @FunctionalInterface 1.13 protected interface SQLFindFunction<K, T> { 1.14 @@ -102,6 +98,12 @@ 1.15 return (ModuleManager) getServletContext().getAttribute(ModuleManager.SC_ATTR_NAME); 1.16 } 1.17 1.18 + /** 1.19 + * Returns the name of the resource bundle associated with this servlet. 1.20 + * @return the resource bundle base name 1.21 + */ 1.22 + protected abstract String getResourceBundleName(); 1.23 + 1.24 1.25 /** 1.26 * Creates a set of data access objects for the specified connection. 1.27 @@ -150,12 +152,7 @@ 1.28 1.29 @Override 1.30 public void init() throws ServletException { 1.31 - moduleInfo = Optional.ofNullable(this.getClass().getAnnotation(LightPITModule.class)) 1.32 - .map(LightPITModule.ELProxy::new).orElse(null); 1.33 - 1.34 - if (moduleInfo != null) { 1.35 - scanForRequestMappings(); 1.36 - } 1.37 + scanForRequestMappings(); 1.38 1.39 LOG.trace("{} initialized", getServletName()); 1.40 } 1.41 @@ -387,7 +384,7 @@ 1.42 final String fullPath = Functions.fullPath(req); 1.43 req.setAttribute(Constants.REQ_ATTR_BASE_HREF, Functions.baseHref(req)); 1.44 req.setAttribute(Constants.REQ_ATTR_PATH, fullPath); 1.45 - Optional.ofNullable(moduleInfo).ifPresent((proxy) -> req.setAttribute(Constants.REQ_ATTR_MODULE_INFO, proxy)); 1.46 + req.setAttribute(Constants.REQ_ATTR_RESOURCE_BUNDLE, getResourceBundleName()); 1.47 1.48 // if this is an error path, bypass the normal flow 1.49 if (fullPath.startsWith("/error/")) {
2.1 --- a/src/main/java/de/uapcore/lightpit/Constants.java Sat May 23 13:34:41 2020 +0200 2.2 +++ b/src/main/java/de/uapcore/lightpit/Constants.java Sat May 23 13:52:04 2020 +0200 2.3 @@ -62,9 +62,9 @@ 2.4 public static final String CTX_ATTR_DB_DIALECT = "db-dialect"; 2.5 2.6 /** 2.7 - * Key for the request attribute containing the {@link LightPITModule} information of the currently dispatching module. 2.8 + * Key for the request attribute containing the resource bundle name. 2.9 */ 2.10 - public static final String REQ_ATTR_MODULE_INFO = fqn(AbstractLightPITServlet.class, "moduleInfo"); 2.11 + public static final String REQ_ATTR_RESOURCE_BUNDLE = fqn(AbstractLightPITServlet.class, "bundleName"); 2.12 2.13 /** 2.14 * Key for the request attribute containing the menu list.
3.1 --- a/src/main/java/de/uapcore/lightpit/Functions.java Sat May 23 13:34:41 2020 +0200 3.2 +++ b/src/main/java/de/uapcore/lightpit/Functions.java Sat May 23 13:52:04 2020 +0200 3.3 @@ -75,28 +75,6 @@ 3.4 } 3.5 3.6 /** 3.7 - * Returns the module path of the given LightPIT Servlet module. 3.8 - * <p> 3.9 - * If you specify a malformed LightPIT servlet, which does not have a module 3.10 - * annotation, the path to the <code>/error/404.html</code> page is returned. 3.11 - * 3.12 - * @param clazz the servlet class 3.13 - * @return the module path 3.14 - */ 3.15 - public static String modulePathOf(Class<? extends AbstractLightPITServlet> clazz) { 3.16 - Optional<LightPITModule> moduleInfo = Optional.ofNullable(clazz.getAnnotation(LightPITModule.class)); 3.17 - if (moduleInfo.isPresent()) { 3.18 - return moduleInfo.get().modulePath(); 3.19 - } else { 3.20 - LOG.warn( 3.21 - "{} is a LightPIT Servlet but is missing the module annotation.", 3.22 - clazz.getName() 3.23 - ); 3.24 - return "/error/404.html"; 3.25 - } 3.26 - } 3.27 - 3.28 - /** 3.29 * This class is not instantiatable. 3.30 */ 3.31 private Functions() {
4.1 --- a/src/main/java/de/uapcore/lightpit/modules/ErrorModule.java Sat May 23 13:34:41 2020 +0200 4.2 +++ b/src/main/java/de/uapcore/lightpit/modules/ErrorModule.java Sat May 23 13:52:04 2020 +0200 4.3 @@ -51,6 +51,11 @@ 4.4 4.5 public static final String REQ_ATTR_RETURN_LINK = "returnLink"; 4.6 4.7 + @Override 4.8 + protected String getResourceBundleName() { 4.9 + return "localization.error"; 4.10 + } 4.11 + 4.12 @RequestMapping(requestPath = "generic", method = HttpMethod.GET) 4.13 public ResponseType onError(HttpServletRequest req, HttpServletResponse resp) { 4.14 Optional.ofNullable(req.getHeader("Referer")).ifPresent(
5.1 --- a/src/main/java/de/uapcore/lightpit/modules/LanguageModule.java Sat May 23 13:34:41 2020 +0200 5.2 +++ b/src/main/java/de/uapcore/lightpit/modules/LanguageModule.java Sat May 23 13:52:04 2020 +0200 5.3 @@ -55,6 +55,11 @@ 5.4 private final List<Locale> languages = new ArrayList<>(); 5.5 5.6 @Override 5.7 + protected String getResourceBundleName() { 5.8 + return "localization.language"; 5.9 + } 5.10 + 5.11 + @Override 5.12 public void init() throws ServletException { 5.13 super.init(); 5.14
6.1 --- a/src/main/java/de/uapcore/lightpit/modules/ProjectsModule.java Sat May 23 13:34:41 2020 +0200 6.2 +++ b/src/main/java/de/uapcore/lightpit/modules/ProjectsModule.java Sat May 23 13:52:04 2020 +0200 6.3 @@ -133,6 +133,10 @@ 6.4 } 6.5 } 6.6 6.7 + @Override 6.8 + protected String getResourceBundleName() { 6.9 + return "localization.projects"; 6.10 + } 6.11 6.12 /** 6.13 * Creates the breadcrumb menu.
7.1 --- a/src/main/java/de/uapcore/lightpit/modules/UsersModule.java Sat May 23 13:34:41 2020 +0200 7.2 +++ b/src/main/java/de/uapcore/lightpit/modules/UsersModule.java Sat May 23 13:52:04 2020 +0200 7.3 @@ -53,6 +53,11 @@ 7.4 7.5 private static final Logger LOG = LoggerFactory.getLogger(UsersModule.class); 7.6 7.7 + @Override 7.8 + protected String getResourceBundleName() { 7.9 + return "localization.users"; 7.10 + } 7.11 + 7.12 @RequestMapping(method = HttpMethod.GET) 7.13 public ResponseType index(HttpServletRequest req, DataAccessObjects dao) throws SQLException { 7.14 final var userDao = dao.getUserDao();
8.1 --- a/src/main/webapp/WEB-INF/jsp/issue-form.jsp Sat May 23 13:34:41 2020 +0200 8.2 +++ b/src/main/webapp/WEB-INF/jsp/issue-form.jsp Sat May 23 13:52:04 2020 +0200 8.3 @@ -25,19 +25,16 @@ 8.4 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 8.5 --%> 8.6 <%@page pageEncoding="UTF-8" %> 8.7 -<%@page import="de.uapcore.lightpit.Constants" %> 8.8 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 8.9 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 8.10 8.11 -<c:set scope="page" var="moduleInfo" value="${requestScope[Constants.REQ_ATTR_MODULE_INFO]}"/> 8.12 - 8.13 <jsp:useBean id="projects" type="java.util.List<de.uapcore.lightpit.entities.Project>" scope="request" /> 8.14 <jsp:useBean id="issue" type="de.uapcore.lightpit.entities.Issue" scope="request"/> 8.15 <jsp:useBean id="issueStatusEnum" type="de.uapcore.lightpit.entities.IssueStatus[]" scope="request"/> 8.16 <jsp:useBean id="issueCategoryEnum" type="de.uapcore.lightpit.entities.IssueCategory[]" scope="request"/> 8.17 <jsp:useBean id="users" type="java.util.List<de.uapcore.lightpit.entities.User>" scope="request"/> 8.18 8.19 -<form action="./${moduleInfo.modulePath}/issues/commit" method="post"> 8.20 +<form action="./projects/issues/commit" method="post"> 8.21 <table class="formtable"> 8.22 <colgroup> 8.23 <col> 8.24 @@ -165,10 +162,10 @@ 8.25 <input type="hidden" name="id" value="${issue.id}"/> 8.26 <c:choose> 8.27 <c:when test="${not empty issue.project and issue.project.id ge 0}"> 8.28 - <c:set var="cancelUrl">./${moduleInfo.modulePath}/view?pid=${issue.project.id}</c:set> 8.29 + <c:set var="cancelUrl">./projects/view?pid=${issue.project.id}</c:set> 8.30 </c:when> 8.31 <c:otherwise> 8.32 - <c:set var="cancelUrl">./${moduleInfo.modulePath}/</c:set> 8.33 + <c:set var="cancelUrl">./projects/</c:set> 8.34 </c:otherwise> 8.35 </c:choose> 8.36 <a href="${cancelUrl}" class="button">
9.1 --- a/src/main/webapp/WEB-INF/jsp/project-details.jsp Sat May 23 13:34:41 2020 +0200 9.2 +++ b/src/main/webapp/WEB-INF/jsp/project-details.jsp Sat May 23 13:52:04 2020 +0200 9.3 @@ -25,20 +25,18 @@ 9.4 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 9.5 --%> 9.6 <%@page pageEncoding="UTF-8" %> 9.7 -<%@page import="de.uapcore.lightpit.Constants" %> 9.8 <%@page import="de.uapcore.lightpit.modules.ProjectsModule" %> 9.9 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 9.10 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 9.11 9.12 -<c:set scope="page" var="moduleInfo" value="${requestScope[Constants.REQ_ATTR_MODULE_INFO]}"/> 9.13 <c:set scope="page" var="selectedProject" value="${sessionScope[ProjectsModule.SESSION_ATTR_SELECTED_PROJECT]}"/> 9.14 9.15 <jsp:useBean id="versions" type="java.util.List<de.uapcore.lightpit.entities.Version>" scope="request"/> 9.16 <jsp:useBean id="issues" type="java.util.List<de.uapcore.lightpit.entities.Issue>" scope="request"/> 9.17 9.18 <div id="tool-area"> 9.19 - <a href="./${moduleInfo.modulePath}/versions/edit" class="button"><fmt:message key="button.version.create"/></a> 9.20 - <a href="./${moduleInfo.modulePath}/issues/edit" class="button"><fmt:message key="button.issue.create"/></a> 9.21 + <a href="./projects/versions/edit" class="button"><fmt:message key="button.version.create"/></a> 9.22 + <a href="./projects/issues/edit" class="button"><fmt:message key="button.issue.create"/></a> 9.23 </div> 9.24 9.25 <c:if test="${not empty versions}"> 9.26 @@ -53,7 +51,7 @@ 9.27 <tbody> 9.28 <c:forEach var="version" items="${versions}"> 9.29 <tr class="nowrap"> 9.30 - <td style="width: 2em;"><a href="./${moduleInfo.modulePath}/versions/edit?id=${version.id}">✎</a> 9.31 + <td style="width: 2em;"><a href="./projects/versions/edit?id=${version.id}">✎</a> 9.32 </td> 9.33 <td><c:out value="${version.name}"/></td> 9.34 <td><fmt:message key="version.status.${version.status}"/></td>
10.1 --- a/src/main/webapp/WEB-INF/jsp/project-form.jsp Sat May 23 13:34:41 2020 +0200 10.2 +++ b/src/main/webapp/WEB-INF/jsp/project-form.jsp Sat May 23 13:52:04 2020 +0200 10.3 @@ -25,16 +25,13 @@ 10.4 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10.5 --%> 10.6 <%@page pageEncoding="UTF-8" %> 10.7 -<%@page import="de.uapcore.lightpit.Constants" %> 10.8 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 10.9 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 10.10 10.11 -<c:set scope="page" var="moduleInfo" value="${requestScope[Constants.REQ_ATTR_MODULE_INFO]}"/> 10.12 - 10.13 <jsp:useBean id="project" type="de.uapcore.lightpit.entities.Project" scope="request"/> 10.14 <jsp:useBean id="users" type="java.util.List<de.uapcore.lightpit.entities.User>" scope="request"/> 10.15 10.16 -<form action="./${moduleInfo.modulePath}/commit" method="post"> 10.17 +<form action="./projects/commit" method="post"> 10.18 <table class="formtable"> 10.19 <colgroup> 10.20 <col> 10.21 @@ -71,8 +68,9 @@ 10.22 <tr> 10.23 <td colspan="2"> 10.24 <input type="hidden" name="id" value="${project.id}"/> 10.25 - <a href="./${moduleInfo.modulePath}/" class="button"><fmt:message bundle="${lightpit_bundle}" 10.26 - key="button.cancel"/></a> 10.27 + <a href="./projects/" class="button"> 10.28 + <fmt:message bundle="${lightpit_bundle}" key="button.cancel"/> 10.29 + </a> 10.30 <button type="submit"><fmt:message bundle="${lightpit_bundle}" key="button.okay"/></button> 10.31 </td> 10.32 </tr>
11.1 --- a/src/main/webapp/WEB-INF/jsp/projects.jsp Sat May 23 13:34:41 2020 +0200 11.2 +++ b/src/main/webapp/WEB-INF/jsp/projects.jsp Sat May 23 13:52:04 2020 +0200 11.3 @@ -25,12 +25,10 @@ 11.4 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 11.5 --%> 11.6 <%@page pageEncoding="UTF-8" %> 11.7 -<%@page import="de.uapcore.lightpit.Constants" %> 11.8 <%@page import="de.uapcore.lightpit.modules.ProjectsModule" %> 11.9 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 11.10 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 11.11 11.12 -<c:set scope="page" var="moduleInfo" value="${requestScope[Constants.REQ_ATTR_MODULE_INFO]}"/> 11.13 <c:set scope="page" var="selectedProject" value="${sessionScope[ProjectsModule.SESSION_ATTR_SELECTED_PROJECT]}"/> 11.14 11.15 <jsp:useBean id="projects" type="java.util.List<de.uapcore.lightpit.entities.Project>" scope="request"/> 11.16 @@ -42,7 +40,7 @@ 11.17 </c:if> 11.18 11.19 <div id="tool-area"> 11.20 - <a href="./${moduleInfo.modulePath}/edit" class="button"><fmt:message key="button.create"/></a> 11.21 + <a href="./projects/edit" class="button"><fmt:message key="button.create"/></a> 11.22 </div> 11.23 11.24 <c:if test="${not empty projects}"> 11.25 @@ -66,8 +64,8 @@ 11.26 <tbody> 11.27 <c:forEach var="project" items="${projects}"> 11.28 <tr class="nowrap"> 11.29 - <td style="width: 2em;"><a href="./${moduleInfo.modulePath}/edit?id=${project.id}">✎</a></td> 11.30 - <td><a href="./${moduleInfo.modulePath}/view?pid=${project.id}"><c:out value="${project.name}"/></a> 11.31 + <td style="width: 2em;"><a href="./projects/edit?id=${project.id}">✎</a></td> 11.32 + <td><a href="./projects/view?pid=${project.id}"><c:out value="${project.name}"/></a> 11.33 </td> 11.34 <td><c:out value="${project.description}"/></td> 11.35 <td>
12.1 --- a/src/main/webapp/WEB-INF/jsp/site.jsp Sat May 23 13:34:41 2020 +0200 12.2 +++ b/src/main/webapp/WEB-INF/jsp/site.jsp Sat May 23 13:52:04 2020 +0200 12.3 @@ -52,8 +52,8 @@ 12.4 <%-- Define an alias for the additional stylesheet --%> 12.5 <c:set scope="page" var="extraCss" value="${requestScope[Constants.REQ_ATTR_STYLESHEET]}"/> 12.6 12.7 -<%-- Define an alias for the module info --%> 12.8 -<c:set scope="page" var="moduleInfo" value="${requestScope[Constants.REQ_ATTR_MODULE_INFO]}"/> 12.9 +<%-- Define an alias for the bundle name --%> 12.10 +<c:set scope="page" var="bundleName" value="${requestScope[Constants.REQ_ATTR_RESOURCE_BUNDLE]}"/> 12.11 12.12 <%-- Apply the session locale (should always be present, but check nevertheless) --%> 12.13 <c:if test="${not empty sessionScope[Constants.SESSION_ATTR_LANGUAGE]}"> 12.14 @@ -63,15 +63,15 @@ 12.15 <%-- Selected project, if any --%> 12.16 <c:set scope="page" var="selectedProject" value="${sessionScope[ProjectsModule.SESSION_ATTR_SELECTED_PROJECT]}"/> 12.17 12.18 +<%-- Load resource bundles --%> 12.19 +<fmt:setBundle scope="request" basename="${bundleName}"/> 12.20 +<fmt:setBundle scope="request" var="lightpit_bundle" basename="localization.lightpit"/> 12.21 + 12.22 <!DOCTYPE html> 12.23 <html> 12.24 <head> 12.25 <base href="${baseHref}"> 12.26 - <title>LightPIT - 12.27 - <fmt:bundle basename="${moduleInfo.bundleBaseName}"> 12.28 - <fmt:message key="pageTitle"/> 12.29 - </fmt:bundle> 12.30 - </title> 12.31 + <title>LightPIT - <fmt:message key="pageTitle"/></title> 12.32 <meta charset="UTF-8"> 12.33 <c:if test="${not empty redirectLocation}"> 12.34 <meta http-equiv="refresh" content="0; URL=${redirectLocation}"> 12.35 @@ -96,8 +96,6 @@ 12.36 </c:if> 12.37 <div id="content-area"> 12.38 <c:if test="${not empty contentPage}"> 12.39 - <fmt:setBundle scope="request" basename="${moduleInfo.bundleBaseName}"/> 12.40 - <fmt:setBundle scope="request" var="lightpit_bundle" basename="localization.lightpit"/> 12.41 <c:import url="${contentPage}"/> 12.42 </c:if> 12.43 </div>
13.1 --- a/src/main/webapp/WEB-INF/jsp/user-form.jsp Sat May 23 13:34:41 2020 +0200 13.2 +++ b/src/main/webapp/WEB-INF/jsp/user-form.jsp Sat May 23 13:52:04 2020 +0200 13.3 @@ -25,15 +25,12 @@ 13.4 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 13.5 --%> 13.6 <%@page pageEncoding="UTF-8" %> 13.7 -<%@page import="de.uapcore.lightpit.Constants" %> 13.8 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 13.9 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 13.10 13.11 -<c:set scope="page" var="moduleInfo" value="${requestScope[Constants.REQ_ATTR_MODULE_INFO]}"/> 13.12 - 13.13 <jsp:useBean id="user" type="de.uapcore.lightpit.entities.User" scope="request"/> 13.14 13.15 -<form action="./${moduleInfo.modulePath}/commit" method="post"> 13.16 +<form action="./teams/commit" method="post"> 13.17 <table class="formtable"> 13.18 <colgroup> 13.19 <col> 13.20 @@ -62,8 +59,9 @@ 13.21 <tr> 13.22 <td colspan="2"> 13.23 <input type="hidden" name="userid" value="${user.id}"/> 13.24 - <a href="./${moduleInfo.modulePath}/" class="button"><fmt:message bundle="${lightpit_bundle}" 13.25 - key="button.cancel"/></a> 13.26 + <a href="./teams/" class="button"> 13.27 + <fmt:message bundle="${lightpit_bundle}" key="button.cancel"/> 13.28 + </a> 13.29 <button type="submit"><fmt:message bundle="${lightpit_bundle}" key="button.okay"/></button> 13.30 </td> 13.31 </tr>
14.1 --- a/src/main/webapp/WEB-INF/jsp/users.jsp Sat May 23 13:34:41 2020 +0200 14.2 +++ b/src/main/webapp/WEB-INF/jsp/users.jsp Sat May 23 13:52:04 2020 +0200 14.3 @@ -25,12 +25,9 @@ 14.4 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 14.5 --%> 14.6 <%@page pageEncoding="UTF-8" %> 14.7 -<%@page import="de.uapcore.lightpit.Constants" %> 14.8 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 14.9 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 14.10 14.11 -<c:set scope="page" var="moduleInfo" value="${requestScope[Constants.REQ_ATTR_MODULE_INFO]}"/> 14.12 - 14.13 <jsp:useBean id="users" type="java.util.List<de.uapcore.lightpit.entities.User>" scope="request"/> 14.14 14.15 <c:if test="${empty users}"> 14.16 @@ -40,7 +37,7 @@ 14.17 </c:if> 14.18 14.19 <div id="tool-area"> 14.20 - <a href="./${moduleInfo.modulePath}/edit" class="button"><fmt:message key="button.create"/></a> 14.21 + <a href="./teams/edit" class="button"><fmt:message key="button.create"/></a> 14.22 </div> 14.23 14.24 <c:if test="${not empty users}"> 14.25 @@ -54,7 +51,7 @@ 14.26 <tbody> 14.27 <c:forEach var="user" items="${users}"> 14.28 <tr> 14.29 - <td><a href="./${moduleInfo.modulePath}/edit?id=${user.id}">✎</a></td> 14.30 + <td><a href="./teams/edit?id=${user.id}">✎</a></td> 14.31 <td><c:out value="${user.displayname}"/></td> 14.32 </tr> 14.33 </c:forEach>
15.1 --- a/src/main/webapp/WEB-INF/jsp/version-form.jsp Sat May 23 13:34:41 2020 +0200 15.2 +++ b/src/main/webapp/WEB-INF/jsp/version-form.jsp Sat May 23 13:52:04 2020 +0200 15.3 @@ -25,17 +25,14 @@ 15.4 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 15.5 --%> 15.6 <%@page pageEncoding="UTF-8" %> 15.7 -<%@page import="de.uapcore.lightpit.Constants" %> 15.8 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 15.9 <%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 15.10 15.11 -<c:set scope="page" var="moduleInfo" value="${requestScope[Constants.REQ_ATTR_MODULE_INFO]}"/> 15.12 - 15.13 <jsp:useBean id="projects" type="java.util.List<de.uapcore.lightpit.entities.Project>" scope="request" /> 15.14 <jsp:useBean id="version" type="de.uapcore.lightpit.entities.Version" scope="request"/> 15.15 <jsp:useBean id="versionStatusEnum" type="de.uapcore.lightpit.entities.VersionStatus[]" scope="request"/> 15.16 15.17 -<form action="./${moduleInfo.modulePath}/versions/commit" method="post"> 15.18 +<form action="./projects/versions/commit" method="post"> 15.19 <table class="formtable" style="width: 35ch"> 15.20 <colgroup> 15.21 <col> 15.22 @@ -83,10 +80,10 @@ 15.23 <input type="hidden" name="id" value="${version.id}"/> 15.24 <c:choose> 15.25 <c:when test="${not empty version.project and version.project.id ge 0}"> 15.26 - <c:set var="cancelUrl">./${moduleInfo.modulePath}/view?pid=${version.project.id}</c:set> 15.27 + <c:set var="cancelUrl">./projects/view?pid=${version.project.id}</c:set> 15.28 </c:when> 15.29 <c:otherwise> 15.30 - <c:set var="cancelUrl">./${moduleInfo.modulePath}/</c:set> 15.31 + <c:set var="cancelUrl">./projects/</c:set> 15.32 </c:otherwise> 15.33 </c:choose> 15.34 <a href="${cancelUrl}" class="button">
16.1 --- a/src/main/webapp/index.jsp Sat May 23 13:34:41 2020 +0200 16.2 +++ b/src/main/webapp/index.jsp Sat May 23 13:52:04 2020 +0200 16.3 @@ -24,9 +24,7 @@ 16.4 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 16.5 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 16.6 --%> 16.7 -<%@page import="de.uapcore.lightpit.Functions" %> 16.8 -<%@ page import="de.uapcore.lightpit.modules.ProjectsModule" %> 16.9 <% 16.10 response.setStatus(response.SC_MOVED_TEMPORARILY); 16.11 - response.setHeader("Location", Functions.modulePathOf(ProjectsModule.class)); 16.12 + response.setHeader("Location", "/projects/"); 16.13 %>