summaryrefslogtreecommitdiff
path: root/BKUOnline/src/main/java
diff options
context:
space:
mode:
authorclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-04-07 08:37:53 +0000
committerclemenso <clemenso@8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4>2009-04-07 08:37:53 +0000
commitac3d1788dfa8db5dd8de5a99764b439dd5ec54db (patch)
tree9dc65bae1994432caf35d0d05b2f08393fc9ff45 /BKUOnline/src/main/java
parent78728a96af022bae87e4d0d11855f420736d87b7 (diff)
downloadmocca-ac3d1788dfa8db5dd8de5a99764b439dd5ec54db.tar.gz
mocca-ac3d1788dfa8db5dd8de5a99764b439dd5ec54db.tar.bz2
mocca-ac3d1788dfa8db5dd8de5a99764b439dd5ec54db.zip
MOCCA-1.1 final
git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@327 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4
Diffstat (limited to 'BKUOnline/src/main/java')
-rw-r--r--BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/AppletDispatcher.java16
1 files changed, 9 insertions, 7 deletions
diff --git a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/AppletDispatcher.java b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/AppletDispatcher.java
index 26349f7c..24938cd5 100644
--- a/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/AppletDispatcher.java
+++ b/BKUOnline/src/main/java/at/gv/egiz/bku/online/webapp/AppletDispatcher.java
@@ -18,8 +18,6 @@
package at.gv.egiz.bku.online.webapp;
import java.io.IOException;
-import java.io.PrintWriter;
-import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
@@ -55,14 +53,18 @@ public class AppletDispatcher extends HttpServlet {
protected void processRequest(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
-// String suffix = (String) request.getSession().getAttribute(RAND_CTX_ATTRIBUTE);
-// log.trace("expecting random suffix " + suffix);
-
String uri = request.getRequestURI();
+// log.trace("request URI " + uri);
+
+ uri = uri.substring(request.getContextPath().length());
+// log.trace("removing contextPath " + uri);
+
uri = ctxPattern.matcher(uri).replaceAll("");
-// uri = uri.replaceAll(suffix, ""); //only the applet jar requests contains the randCtx
- uri = archivePattern.matcher(uri).replaceAll(".jar");
+// log.trace("removing dispatch context " + uri);
+ uri = archivePattern.matcher(uri).replaceAll(".jar");
+// log.trace("removing random suffix " + uri);
+
if (log.isTraceEnabled()) {
log.trace("dispatching request URI " + request.getRequestURI() +
" to " + uri);