summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/web-javascript-dojo
diff options
context:
space:
mode:
Diffstat (limited to 'sca-java-2.x/trunk/modules/web-javascript-dojo')
-rw-r--r--sca-java-2.x/trunk/modules/web-javascript-dojo/build-dojo.xml2
-rw-r--r--sca-java-2.x/trunk/modules/web-javascript-dojo/src/main/java/org/apache/tuscany/sca/web/javascript/dojo/DojoResourceServlet.java3
-rw-r--r--sca-java-2.x/trunk/modules/web-javascript-dojo/src/main/java/org/apache/tuscany/sca/web/javascript/dojo/DojoWidgetJavascriptProvider.java16
3 files changed, 19 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/web-javascript-dojo/build-dojo.xml b/sca-java-2.x/trunk/modules/web-javascript-dojo/build-dojo.xml
index bcfa3c134d..b1e645c261 100644
--- a/sca-java-2.x/trunk/modules/web-javascript-dojo/build-dojo.xml
+++ b/sca-java-2.x/trunk/modules/web-javascript-dojo/build-dojo.xml
@@ -49,7 +49,7 @@
<patternset>
<include name="dojo-${dojo.version}/dojo/**"/>
<exclude name="dojo-${dojo.version}/dojo/tests/**"/>
- <exclude name="dojo-${dojo.version}/dijit/**"/>
+ <include name="dojo-${dojo.version}/dijit/**"/>
<include name="dojo-${dojo.version}/dojox/**"/>
<exclude name="dojo-${dojo.version}/util/**"/>
</patternset>
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 8bbffff9f9..f3021b3c63 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
@@ -51,7 +51,8 @@ public class DojoResourceServlet extends HttpServlet {
String path = URLDecoder.decode(request.getRequestURI(), HTTPConstants.CHARACTER_ENCODING_UTF8);
if( path.startsWith(contextRoot + "/dojo")||
- path.startsWith(contextRoot + "/dojox")) {
+ path.startsWith(contextRoot + "/dojox")||
+ path.startsWith(contextRoot + "/dijit")) {
if( ! path.contains("tuscany/")) {
//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
diff --git a/sca-java-2.x/trunk/modules/web-javascript-dojo/src/main/java/org/apache/tuscany/sca/web/javascript/dojo/DojoWidgetJavascriptProvider.java b/sca-java-2.x/trunk/modules/web-javascript-dojo/src/main/java/org/apache/tuscany/sca/web/javascript/dojo/DojoWidgetJavascriptProvider.java
index 8b8eb2b61e..b90545d65d 100644
--- a/sca-java-2.x/trunk/modules/web-javascript-dojo/src/main/java/org/apache/tuscany/sca/web/javascript/dojo/DojoWidgetJavascriptProvider.java
+++ b/sca-java-2.x/trunk/modules/web-javascript-dojo/src/main/java/org/apache/tuscany/sca/web/javascript/dojo/DojoWidgetJavascriptProvider.java
@@ -39,6 +39,9 @@ public class DojoWidgetJavascriptProvider implements WidgetImplementationJavascr
private static final String dojoxBaseUri = URI.create("/dojox").toString();
private static final String dojoxUri = URI.create("/dojox/*").toString();
+ private static final String dijitBaseUri = URI.create("/dijit").toString();
+ private static final String dijitUri = URI.create("/dijit/*").toString();
+
private static final String tuscanyBaseUri = URI.create("/tuscany").toString();
private static final String tuscanyUri = URI.create("/tuscany/*").toString();
@@ -84,6 +87,19 @@ public class DojoWidgetJavascriptProvider implements WidgetImplementationJavascr
}
}
+ servlet = servletHost.getServletMapping(dijitBaseUri);
+ if(servlet == null) {
+ try {
+ DojoResourceServlet baseResourceServlet = new DojoResourceServlet();
+ servletHost.addServletMapping(dijitBaseUri, baseResourceServlet);
+
+ DojoResourceServlet resourceServlet = new DojoResourceServlet();
+ servletHost.addServletMapping(dijitUri, resourceServlet);
+ } catch (ServletMappingException me ) {
+ logger.warning("Dijit already registered at :" + dijitBaseUri);
+ }
+ }
+
servlet = servletHost.getServletMapping(tuscanyBaseUri);
if(servlet == null) {
try {