summaryrefslogtreecommitdiff
path: root/BKUOnline/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'BKUOnline/src/main')
-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>
<!--