diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/web-javascript-dojo/src/main/java/org')
-rw-r--r-- | sca-java-2.x/trunk/modules/web-javascript-dojo/src/main/java/org/apache/tuscany/sca/web/javascript/dojo/DojoResourceServlet.java | 12 |
1 files changed, 9 insertions, 3 deletions
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 f3021b3c63..8218baa438 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 @@ -50,15 +50,21 @@ public class DojoResourceServlet extends HttpServlet { String contextRoot = URLDecoder.decode(HTTPUtils.getContextRoot(request), HTTPConstants.CHARACTER_ENCODING_UTF8); String path = URLDecoder.decode(request.getRequestURI(), HTTPConstants.CHARACTER_ENCODING_UTF8); - if( path.startsWith(contextRoot + "/dojo")|| - path.startsWith(contextRoot + "/dojox")|| + if( path.startsWith(contextRoot + "/dojo") || + path.startsWith(contextRoot + "/dojox") || path.startsWith(contextRoot + "/dijit")) { - if( ! path.contains("tuscany/")) { + //is they are dojo modules + + if( (! path.contains("tuscany/AtomService.js")) && + (! path.contains("tuscany/RestService.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; } + + System.out.println(">>>Path :" + path); } else if (path.startsWith(contextRoot)) { path = path.substring(contextRoot.length() + 1); } else if( path.startsWith("/")) { |