tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r1142068 - in /tomcat/trunk: java/org/apache/catalina/startup/Tomcat.java webapps/docs/changelog.xml
Date Fri, 01 Jul 2011 20:20:33 GMT
Author: kkolinko
Date: Fri Jul  1 20:20:33 2011
New Revision: 1142068

URL: http://svn.apache.org/viewvc?rev=1142068&view=rev
Log:
In Tomcat.initBaseDir():
set a value for catalina.home only if it has not been set previously.

Without this fix, I guess, you won't be able to run embedded Tomcat with
separate catalina.base and catalina.home.

Modified:
    tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
    tomcat/trunk/webapps/docs/changelog.xml

Modified: tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java?rev=1142068&r1=1142067&r2=1142068&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java (original)
+++ tomcat/trunk/java/org/apache/catalina/startup/Tomcat.java Fri Jul  1 20:20:33 2011
@@ -613,11 +613,12 @@ public class Tomcat {
     }
     
     protected void initBaseDir() {
+        String catalinaHome = System.getProperty(Globals.CATALINA_HOME_PROP);
         if (basedir == null) {
             basedir = System.getProperty(Globals.CATALINA_BASE_PROP);
         }
         if (basedir == null) {
-            basedir = System.getProperty(Globals.CATALINA_HOME_PROP);
+            basedir = catalinaHome;
         }
         if (basedir == null) {
             // Create a temp dir.
@@ -633,7 +634,9 @@ public class Tomcat {
                 }
             }
         }
-        System.setProperty(Globals.CATALINA_HOME_PROP, basedir);
+        if (catalinaHome == null) {
+            System.setProperty(Globals.CATALINA_HOME_PROP, basedir);
+        }
         System.setProperty(Globals.CATALINA_BASE_PROP, basedir);
     }
 

Modified: tomcat/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1142068&r1=1142067&r2=1142068&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/trunk/webapps/docs/changelog.xml Fri Jul  1 20:20:33 2011
@@ -190,6 +190,10 @@
         Prevent possible NPE when serving Servlets that implement the
         SingleThreadModel interface. (markt)
       </fix>
+      <fix>
+        In launcher for embedded Tomcat: do not change <code>catalina.home</code>
+        system property if it had a value. (kkolinko)
+      </fix>
     </changelog>
   </subsection>
   <subsection name="Coyote">
@@ -235,7 +239,7 @@
       <fix>
         <bug>36362</bug>: Handle the case where tag file attributes (which can
         use any valid XML name) have a name which is not a Java identifier.
-        (markt)
+        (markt/kkolinko)
       </fix>
       <add>
         Broaden the exception handling in the EL Parser so that more failures to



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


Mime
View raw message