jfarcand 2004/05/18 09:33:24
Modified: catalina/src/conf catalina.properties
catalina/src/share/org/apache/catalina/startup
CatalinaProperties.java
Log:
Make catalina.properties file configurable from catalina.base as well as
catalina.home. Sometime catalina.home is write protected so modifying the file was
impossible.
Revision Changes Path
1.10 +6 -4 jakarta-tomcat-catalina/catalina/src/conf/catalina.properties
Index: catalina.properties
===================================================================
RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/conf/catalina.properties,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- catalina.properties 26 Sep 2003 19:32:08 -0000 1.9
+++ catalina.properties 18 May 2004 16:33:24 -0000 1.10
@@ -21,8 +21,9 @@
#
# List of comma-separated paths defining the contents of the "common"
# classloader. Prefixes should be used to define what is the repository type.
-# Path may be relative to the CATALINA_HOME path or absolute. If left as blank,
-# the JVM system loader will be used as Catalina's "common" loader.
+# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
+# If left as blank,the JVM system loader will be used as Catalina's "common"
+# loader.
# Examples:
# "foo": Add this folder as a class repository
# "foo/*.jar": Add all the JARs of the specified folder as class
@@ -33,8 +34,9 @@
#
# List of comma-separated paths defining the contents of the "server"
# classloader. Prefixes should be used to define what is the repository type.
-# Path may be relative to the CATALINA_HOME path or absolute. If left as blank,
-# the "common" loader will be used as Catalina's "server" loader.
+# Path may be relative to the CATALINA_HOME or CATALINA_BASE path or absolute.
+# If left as blank, the "common" loader will be used as Catalina's "server"
+# loader.
# Examples:
# "foo": Add this folder as a class repository
# "foo/*.jar": Add all the JARs of the specified folder as class
1.6 +10 -2
jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/CatalinaProperties.java
Index: CatalinaProperties.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/CatalinaProperties.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- CatalinaProperties.java 27 Feb 2004 14:58:48 -0000 1.5
+++ CatalinaProperties.java 18 May 2004 16:33:24 -0000 1.6
@@ -93,7 +93,7 @@
if (is == null) {
try {
- File home = new File(getCatalinaHome());
+ File home = new File(getCatalinaBase());
File conf = new File(home, "conf");
File properties = new File(conf, "catalina.properties");
is = new FileInputStream(properties);
@@ -145,6 +145,14 @@
private static String getCatalinaHome() {
return System.getProperty("catalina.home",
System.getProperty("user.dir"));
+ }
+
+
+ /**
+ * Get the value of the catalina.base environment variable.
+ */
+ private static String getCatalinaBase() {
+ return System.getProperty("catalina.base", getCatalinaHome());
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]