diff options
Diffstat (limited to 'sca-java-2.x/trunk')
3 files changed, 7 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/web-javascript-dojo/META-INF/MANIFEST.MF b/sca-java-2.x/trunk/modules/web-javascript-dojo/META-INF/MANIFEST.MF index 2540dbcdc3..2730e38cbb 100644 --- a/sca-java-2.x/trunk/modules/web-javascript-dojo/META-INF/MANIFEST.MF +++ b/sca-java-2.x/trunk/modules/web-javascript-dojo/META-INF/MANIFEST.MF @@ -22,3 +22,4 @@ Bundle-DocURL: http://www.apache.org/ Bundle-RequiredExecutionEnvironment: J2SE-1.5,JavaSE-1.6
+
diff --git a/sca-java-2.x/trunk/modules/web-javascript-dojo/pom.xml b/sca-java-2.x/trunk/modules/web-javascript-dojo/pom.xml index fa0c0140be..be75ad8eb4 100644 --- a/sca-java-2.x/trunk/modules/web-javascript-dojo/pom.xml +++ b/sca-java-2.x/trunk/modules/web-javascript-dojo/pom.xml @@ -111,5 +111,4 @@ </plugin> </plugins> </build> - </project> diff --git a/sca-java-2.x/trunk/modules/web-javascript-dojo/src/main/java/org/apache/tuscany/sca/web/javascript/dojo/DojoResourceServlet.java b/sca-java-2.x/trunk/modules/web-javascript-dojo/src/main/java/org/apache/tuscany/sca/web/javascript/dojo/DojoResourceServlet.java index 20c9fe4959..dad72be5f2 100644 --- a/sca-java-2.x/trunk/modules/web-javascript-dojo/src/main/java/org/apache/tuscany/sca/web/javascript/dojo/DojoResourceServlet.java +++ b/sca-java-2.x/trunk/modules/web-javascript-dojo/src/main/java/org/apache/tuscany/sca/web/javascript/dojo/DojoResourceServlet.java @@ -30,6 +30,7 @@ import javax.servlet.http.HttpServletResponse; import org.apache.tuscany.sca.common.http.HTTPConstants; import org.apache.tuscany.sca.common.http.HTTPContentTypeMapper; +import org.apache.tuscany.sca.common.http.HTTPUtil; /** @@ -46,14 +47,18 @@ public class DojoResourceServlet extends HttpServlet { @Override public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException { + String contextRoot = URLDecoder.decode(HTTPUtil.getContextRoot(request), HTTPConstants.CHARACTER_ENCODING_UTF8); String path = URLDecoder.decode(request.getRequestURI(), HTTPConstants.CHARACTER_ENCODING_UTF8); - if( path.startsWith("/dojo") ) { + if( path.startsWith(contextRoot + "/dojo") ) { if( ! path.contains("tuscany/AtomService.js")) { //this is a workaround where we need to have dojo files in its own folder //to avoid clean target to clean other non dojo resources + path = path.substring(contextRoot.length()); path = "/dojo" + path; } + } else if (path.startsWith(contextRoot)) { + path = path.substring(contextRoot.length() + 1); } else if( path.startsWith("/")) { path = path.substring(1); } |