From 4793edeb2e0b18059c965759c78f06c6b77faf67 Mon Sep 17 00:00:00 2001 From: antelder Date: Sun, 12 Jun 2011 07:26:14 +0000 Subject: Fix so that registering servlets with a * suffix in the path works git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1134878 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/tuscany/sca/http/osgi/OSGiServletHost.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'sca-java-2.x/trunk/modules/host-http-osgi/src/main/java') diff --git a/sca-java-2.x/trunk/modules/host-http-osgi/src/main/java/org/apache/tuscany/sca/http/osgi/OSGiServletHost.java b/sca-java-2.x/trunk/modules/host-http-osgi/src/main/java/org/apache/tuscany/sca/http/osgi/OSGiServletHost.java index 643599afb8..467fcf8fbd 100644 --- a/sca-java-2.x/trunk/modules/host-http-osgi/src/main/java/org/apache/tuscany/sca/http/osgi/OSGiServletHost.java +++ b/sca-java-2.x/trunk/modules/host-http-osgi/src/main/java/org/apache/tuscany/sca/http/osgi/OSGiServletHost.java @@ -116,6 +116,11 @@ public class OSGiServletHost implements ServletHost, BundleActivator { suri = contextPath + suri; } + // The OSGi HTTP service doesn't use an aster for sub-paths so strip it off + if (suri.endsWith("/*")) { + suri = suri.substring(0, suri.length()-2); + } + // In a webapp just use the given path and ignore the host and port // as they are fixed by the Web container try { -- cgit v1.2.3