Author: antelder
Date: Wed Feb 20 01:16:59 2008
New Revision: 629392

URL: http://svn.apache.org/viewvc?rev=629392&view=rev
Log:
Enable defining the contribution root

Modified:
    
incubator/tuscany/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java

Modified: 
incubator/tuscany/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java?rev=629392&r1=629391&r2=629392&view=diff
==============================================================================
--- 
incubator/tuscany/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java
 (original)
+++ 
incubator/tuscany/java/sca/modules/host-webapp/src/main/java/org/apache/tuscany/sca/host/webapp/WebAppServletHost.java
 Wed Feb 20 01:16:59 2008
@@ -236,7 +236,11 @@
             // ignore exception and use default location
 
             try {
-                String root = "/";
+                
+                String root = 
servletContext.getInitParameter("contributionRoot");
+                if (root == null || root.length() < 1) {
+                    root = "/";
+                }
                 URL rootURL = servletContext.getResource(root);
                 if (rootURL.getProtocol().equals("jndi")) {
                     //this is tomcat case, we should use getRealPath
@@ -246,6 +250,7 @@
                     //this is jetty case
                     contributionRoot = rootURL.toString();
                 }
+
             } catch (MalformedURLException mf) {
                 //ignore, pass null
             }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to