summaryrefslogtreecommitdiffstats
path: root/java/sca/modules
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-08-11 12:30:29 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2009-08-11 12:30:29 +0000
commit5893059c57c5a359d20cd866c570519135d26c1c (patch)
tree9add6143311cec5c67ecbde57b58c44201ac14f5 /java/sca/modules
parent897621b3882414ff65c5a07c1a3f11758f183995 (diff)
Fix calculation of service uri with a null context path
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@803084 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/sca/modules')
-rw-r--r--java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java b/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java
index c572d9f1d3..f4315ad07e 100644
--- a/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java
+++ b/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java
@@ -167,7 +167,9 @@ public class WebAppServletHost implements ServletHost {
suri = '/' + suri;
}
- suri = contextPath + suri;
+ if (contextPath != null && contextPath.length() > 0 && !"/".equals(contextPath)) {
+ suri = contextPath + suri;
+ }
// Get the Servlet mapped to the given path
Servlet servlet = servlets.get(suri);