tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1239521 - in /tomcat/trunk/java/org/apache/catalina/startup: ContextConfig.java HostConfig.java
Date Thu, 02 Feb 2012 10:31:39 GMT
Author: markt
Date: Thu Feb  2 10:31:39 2012
New Revision: 1239521

URL: http://svn.apache.org/viewvc?rev=1239521&view=rev
Log:
Couple more container based locations.
Really need to move setting this to the server.

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
    tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java

Modified: tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java?rev=1239521&r1=1239520&r2=1239521&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/ContextConfig.java Thu Feb  2 10:31:39 2012
@@ -1097,8 +1097,12 @@ public class ContextConfig implements Li
      * Get config base.
      */
     protected File getConfigBase() {
-        File configBase =
-            new File(System.getProperty(Globals.CATALINA_BASE_PROP), "conf");
+        File catalinaBase = context.getCatalinaBase();
+        if (catalinaBase == null) {
+            return null;
+        }
+
+        File configBase = new File(catalinaBase, "conf");
         if (!configBase.exists()) {
             return null;
         }

Modified: tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java?rev=1239521&r1=1239520&r2=1239521&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/HostConfig.java Thu Feb  2 10:31:39 2012
@@ -16,7 +16,6 @@
  */
 package org.apache.catalina.startup;
 
-
 import java.io.BufferedOutputStream;
 import java.io.File;
 import java.io.FileInputStream;
@@ -46,7 +45,6 @@ import javax.management.ObjectName;
 import org.apache.catalina.Container;
 import org.apache.catalina.Context;
 import org.apache.catalina.Engine;
-import org.apache.catalina.Globals;
 import org.apache.catalina.Host;
 import org.apache.catalina.Lifecycle;
 import org.apache.catalina.LifecycleEvent;
@@ -387,9 +385,8 @@ public class HostConfig
 
     protected File returnCanonicalPath(String path) {
         File file = new File(path);
-        File base = new File(System.getProperty(Globals.CATALINA_BASE_PROP));
         if (!file.isAbsolute())
-            file = new File(base,path);
+            file = new File(host.getCatalinaBase(), path);
         try {
             return file.getCanonicalFile();
         } catch (IOException e) {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message