You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by cr...@locus.apache.org on 2000/10/01 02:22:52 UTC
cvs commit: jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup Catalina.java
craigmcc 00/09/30 17:22:52
Modified: catalina/src/share/org/apache/catalina/startup Catalina.java
Log:
Set the "catalina.home" system property to the value of the current working
directory, if it has not been set by the startup script (as is done by the
standard scripts).
Revision Changes Path
1.7 +19 -4 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java
Index: Catalina.java
===================================================================
RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Catalina.java 2000/09/30 19:15:47 1.6
+++ Catalina.java 2000/10/01 00:22:52 1.7
@@ -1,7 +1,7 @@
/*
- * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v 1.6 2000/09/30 19:15:47 craigmcc Exp $
- * $Revision: 1.6 $
- * $Date: 2000/09/30 19:15:47 $
+ * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Catalina.java,v 1.7 2000/10/01 00:22:52 craigmcc Exp $
+ * $Revision: 1.7 $
+ * $Date: 2000/10/01 00:22:52 $
*
* ====================================================================
*
@@ -95,7 +95,7 @@
* </u>
*
* @author Craig R. McClanahan
- * @version $Revision: 1.6 $ $Date: 2000/09/30 19:15:47 $
+ * @version $Revision: 1.7 $ $Date: 2000/10/01 00:22:52 $
*/
public class Catalina {
@@ -163,6 +163,7 @@
*/
public void process(String args[]) {
+ setCatalinaHome();
try {
if (arguments(args))
execute();
@@ -595,6 +596,20 @@
start();
else if (stopping)
stop();
+
+ }
+
+
+ /**
+ * Set the <code>catalina.home</code> System property to the current
+ * working directory if it has not been set.
+ */
+ protected void setCatalinaHome() {
+
+ if (System.getProperty("catalina.home") != null)
+ return;
+ System.setProperty("catalina.home",
+ System.getProperty("user.dir"));
}