summaryrefslogtreecommitdiffstats
path: root/java/sca/modules
diff options
context:
space:
mode:
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);