geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jgenen...@apache.org
Subject svn commit: r219809 - /geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContainer.java
Date Tue, 19 Jul 2005 23:31:04 GMT
Author: jgenender
Date: Tue Jul 19 16:31:03 2005
New Revision: 219809

URL: http://svn.apache.org/viewcvs?rev=219809&view=rev
Log:
Fixed the default rootT context to be CATALINA_HOME if ROOT does not exist

Modified:
    geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContainer.java

Modified: geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContainer.java
URL: http://svn.apache.org/viewcvs/geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContainer.java?rev=219809&r1=219808&r2=219809&view=diff
==============================================================================
--- geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContainer.java
(original)
+++ geronimo/trunk/modules/tomcat/src/java/org/apache/geronimo/tomcat/TomcatContainer.java
Tue Jul 19 16:31:03 2005
@@ -136,10 +136,20 @@
         embedded.setUseNaming(false);
 
         //Add default contexts
-        TomcatClassLoader tcl = createRootClassLoader(new File(System.getProperty("catalina.home")
+ "/ROOT"), classLoader);
+        File rootContext = new File(System.getProperty("catalina.home") + "/ROOT");
+
+        TomcatClassLoader tcl = null;
+        if (rootContext.exists())
+            tcl = createRootClassLoader(rootContext, classLoader);
+
         Container[] hosts = engine.findChildren();
+        Context defaultContext = null;
         for(int i = 0; i < hosts.length; i++){
-            Context defaultContext = embedded.createContext("","ROOT", tcl);
+            if (rootContext.exists()){
+                defaultContext = embedded.createContext("","ROOT", tcl);
+            } else {
+                defaultContext = embedded.createContext("","", classLoader);
+            }
             hosts[i].addChild(defaultContext);
         }
         



Mime
View raw message