From 588762db4d8dfbd58b29eb362d025e2999f22c84 Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Sun, 19 Sep 2010 06:30:21 +0000 Subject: Fixes to get the store contribution working in a webapp. Make atom binding use the deployed binding URI, like the JSON-RPC already does. Change the dojo include from absolute to a relative path. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@998596 13f79535-47bb-0310-9956-ffa450edef68 --- .../sca/binding/atom/provider/AtomServiceBindingProvider.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'sca-java-2.x/trunk/modules/binding-atom-runtime/src') diff --git a/sca-java-2.x/trunk/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomServiceBindingProvider.java b/sca-java-2.x/trunk/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomServiceBindingProvider.java index 155d07ae86..bc8149a67a 100644 --- a/sca-java-2.x/trunk/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomServiceBindingProvider.java +++ b/sca-java-2.x/trunk/modules/binding-atom-runtime/src/main/java/org/apache/tuscany/sca/binding/atom/provider/AtomServiceBindingProvider.java @@ -95,7 +95,15 @@ class AtomServiceBindingProvider implements ServiceBindingProvider { bindingURI += "/"; } - servletHost.addServletMapping(bindingURI, servlet); + String mappedURI = servletHost.addServletMapping(bindingURI, servlet); + String deployedURI = mappedURI; + if (deployedURI.endsWith("*")) { + deployedURI = deployedURI.substring(0, deployedURI.length() - 1); + } + if (deployedURI.endsWith("/")) { + deployedURI = deployedURI.substring(0, deployedURI.length() - 1); + } + binding.setURI(deployedURI); } public void stop() { -- cgit v1.2.3