summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2013-11-14 11:20:35 +0000
committertkellner <tkellner@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2013-11-14 11:20:35 +0000
commit2eb8bc420b4f239bed907d29c547737a56a22c8d (patch)
tree41a67a1e9a40a127cd41d711b23b7da36f026837
parentf003aa60cff9eb68b318a1100bd1b56bae37c092 (diff)
downloadmocca-2eb8bc420b4f239bed907d29c547737a56a22c8d.tar.gz
mocca-2eb8bc420b4f239bed907d29c547737a56a22c8d.tar.bz2
mocca-2eb8bc420b4f239bed907d29c547737a56a22c8d.zip
Make ui redirect url configurable
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@1218 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
-rw-r--r--BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/WebRequestHandler.java18
-rw-r--r--BKUOnline/src/main/webapp/WEB-INF/web.xml7
2 files changed, 20 insertions, 5 deletions
diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/WebRequestHandler.java b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/WebRequestHandler.java
index 53175b3c..6accc5a1 100644
--- a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/WebRequestHandler.java
+++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/WebRequestHandler.java
@@ -21,8 +21,6 @@
* that you distribute must include a readable copy of the "NOTICE" text file.
*/
-
-
package at.gv.egiz.bku.online.webapp;
import java.io.ByteArrayInputStream;
@@ -51,9 +49,20 @@ import at.gv.egiz.org.apache.tomcat.util.http.AcceptLanguage;
public class WebRequestHandler extends HttpServlet {
private static final long serialVersionUID = 1L;
-
+
private final Logger log = LoggerFactory.getLogger(WebRequestHandler.class);
+ private String uiRedirectUrl = "ui";
+
+ @Override
+ public void init() throws ServletException {
+ String url = getServletConfig().getInitParameter("uiRedirectUrl");
+ if (url != null) {
+ uiRedirectUrl = url;
+ log.info("Init uiRedirectUrl to: {}.", uiRedirectUrl);
+ }
+ }
+
@Override
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException,
java.io.IOException {
@@ -138,7 +147,7 @@ public class WebRequestHandler extends HttpServlet {
bindingProcessorManager.process(id, bindingProcessor);
log.debug("Sending redirect to user interface.");
- resp.sendRedirect(resp.encodeRedirectURL("ui"));
+ resp.sendRedirect(resp.encodeRedirectURL(uiRedirectUrl));
}
@@ -147,5 +156,4 @@ public class WebRequestHandler extends HttpServlet {
throws ServletException, java.io.IOException {
doPost(req, resp);
}
-
}
diff --git a/BKUOnline/src/main/webapp/WEB-INF/web.xml b/BKUOnline/src/main/webapp/WEB-INF/web.xml
index a7abe389..5033cc5e 100644
--- a/BKUOnline/src/main/webapp/WEB-INF/web.xml
+++ b/BKUOnline/src/main/webapp/WEB-INF/web.xml
@@ -58,6 +58,13 @@
<param-name>protocol</param-name>
<param-value>HTTP</param-value>
</init-param>
+ <init-param>
+ <!--
+ The user interface url the browser will be redirected to
+ -->
+ <param-name>uiRedirectUrl</param-name>
+ <param-value>ui</param-value>
+ </init-param>
</servlet>
<servlet>
<!--