summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-07-23 12:32:03 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2009-07-23 12:32:03 +0000
commit1bbec745b5db6c53fcbc9c12b297015d5a97dac8 (patch)
tree4067bb0a6148aa8e8d8c75601450ffdc5b2c7361
parent7217242131d767d9cd1085072d043649ea78b3a3 (diff)
TUSCANY-3173 - make getServletMapping handle the input mapping in the same ways as addServletMapping(). Allows servlets to to be found and removed successfully.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@797040 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--branches/sca-java-1.x/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java5
1 files changed, 5 insertions, 0 deletions
diff --git a/branches/sca-java-1.x/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java b/branches/sca-java-1.x/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java
index 045cae4e75..a33d29df9f 100644
--- a/branches/sca-java-1.x/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java
+++ b/branches/sca-java-1.x/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java
@@ -126,6 +126,11 @@ public class WebAppServletHost implements ServletHost {
}
public Servlet getServletMapping(String suri) throws ServletMappingException {
+ URI pathURI = URI.create(suri);
+
+ // Make sure that the path starts with a /
+ suri = pathURI.getPath();
+
if (!suri.startsWith("/")) {
suri = '/' + suri;
}