You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2009/10/26 10:09:51 UTC

svn commit: r829732 - /tuscany/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppRequestDispatcher.java

Author: antelder
Date: Mon Oct 26 09:09:51 2009
New Revision: 829732

URL: http://svn.apache.org/viewvc?rev=829732&view=rev
Log:
Update to remove the entire serelet path if the path starts with it so that servelts registered with the Tuscany ServletHost get the correct value. (Not sure i completely understand the rest of the code in that method, does anyone else?)

Modified:
    tuscany/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppRequestDispatcher.java

Modified: tuscany/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppRequestDispatcher.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppRequestDispatcher.java?rev=829732&r1=829731&r2=829732&view=diff
==============================================================================
--- tuscany/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppRequestDispatcher.java (original)
+++ tuscany/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppRequestDispatcher.java Mon Oct 26 09:09:51 2009
@@ -86,6 +86,9 @@
      * Remove any path suffix thats part of the Servlet context path
      */
     protected String fiddlePath(String path, String servletPath) {
+        if (path.startsWith(servletPath)) {
+            return path.substring(servletPath.length());
+        }
         StringTokenizer st = new StringTokenizer(path, "/");
         if (st.countTokens() == 1) {
             return path;