Author: slaws
Date: Mon Nov 19 02:05:22 2007
New Revision: 596246

URL: http://svn.apache.org/viewvc?rev=596246&view=rev
Log:
Ensure that a "/" separates the context from the servlet path 

Modified:
    
incubator/tuscany/java/sca/modules/host-tomcat/src/main/java/org/apache/tuscany/sca/http/tomcat/TomcatServer.java

Modified: 
incubator/tuscany/java/sca/modules/host-tomcat/src/main/java/org/apache/tuscany/sca/http/tomcat/TomcatServer.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/host-tomcat/src/main/java/org/apache/tuscany/sca/http/tomcat/TomcatServer.java?rev=596246&r1=596245&r2=596246&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/modules/host-tomcat/src/main/java/org/apache/tuscany/sca/http/tomcat/TomcatServer.java
 (original)
+++ 
incubator/tuscany/java/sca/modules/host-tomcat/src/main/java/org/apache/tuscany/sca/http/tomcat/TomcatServer.java
 Mon Nov 19 02:05:22 2007
@@ -188,6 +188,11 @@
 
         // Register the servlet mapping
         String path = uri.getPath();
+        
+        if (!path.startsWith("/")) {
+            path = '/' + path;
+        }
+        
         if (!path.startsWith(contextPath)) {
             path = contextPath + path;
         }
@@ -264,6 +269,11 @@
         
         // Construct the URL
         String path = uri.getPath();
+
+        if (!path.startsWith("/")) {
+            path = '/' + path;
+        }
+        
         if (!path.startsWith(contextPath)) {
             path = contextPath + path;
         }
@@ -277,6 +287,11 @@
     }
         
     public Servlet getServletMapping(String suri) throws 
ServletMappingException {
+        
+        if (suri == null){
+           return null;
+        }
+        
         URI uri = URI.create(suri);
         
         // Get the URI port



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to