From 599237932cc7415bd3410456d289d90c28a38405 Mon Sep 17 00:00:00 2001 From: Thomas Lenz Date: Mon, 14 Mar 2016 12:02:02 +0100 Subject: fix path problem in GUI form-builder --- .../auth/frontend/builder/AbstractGUIFormBuilderConfiguration.java | 5 ++++- .../egovernment/moa/id/auth/frontend/builder/GUIFormBuilderImpl.java | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/AbstractGUIFormBuilderConfiguration.java b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/AbstractGUIFormBuilderConfiguration.java index 71a4837d4..52c1f0f97 100644 --- a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/AbstractGUIFormBuilderConfiguration.java +++ b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/AbstractGUIFormBuilderConfiguration.java @@ -50,7 +50,10 @@ public abstract class AbstractGUIFormBuilderConfiguration implements IGUIBuilder * */ public AbstractGUIFormBuilderConfiguration(String authURL, String viewName, String formSubmitEndpoint) { - this.viewName = viewName; + if (viewName.startsWith("/")) + this.viewName = viewName.substring(1); + else + this.viewName = viewName; if (authURL.endsWith("/")) this.authURL = authURL.substring(0, authURL.length() - 1); diff --git a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/GUIFormBuilderImpl.java b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/GUIFormBuilderImpl.java index 862c7edcf..94fa4d977 100644 --- a/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/GUIFormBuilderImpl.java +++ b/id/server/moa-id-frontend-resources/src/main/java/at/gv/egovernment/moa/id/auth/frontend/builder/GUIFormBuilderImpl.java @@ -55,8 +55,8 @@ import at.gv.egovernment.moa.util.MiscUtil; public class GUIFormBuilderImpl implements IGUIFormBuilder { private static final String DEFAULT_CONTENT_TYPE = "text/html;charset=UTF-8"; - private static final String CONFIG_HTMLTEMPLATES_DIR = "htmlTemplates"; - private static final String CLASSPATH_HTMLTEMPLATES_DIR = "templates"; + private static final String CONFIG_HTMLTEMPLATES_DIR = "htmlTemplates/"; + private static final String CLASSPATH_HTMLTEMPLATES_DIR = "templates/"; @Autowired private AuthConfiguration authConfig; private VelocityEngine engine; -- cgit v1.2.3