files in the following directories based on the value of $CATALINA_BASE instead
of $CATALINA_HOME:
-* bin - Only setenv.sh (*nix) and setenv.bat (windows)
+* bin - Only setenv.sh (*nix), setenv.bat (windows) and tomcat-juli.jar
* conf - Server configuration files (including server.xml)
set CATALINA_TMPDIR=%CATALINA_BASE%\temp
:gotTmpdir
+rem Add tomcat-juli.jar to classpath
+rem tomcat-juli.jar can be over-ridden per instance
+if not exist "%CATALINA_BASE%\bin\tomcat-juli.jar" goto juliClasspathHome
+set CLASSPATH=%CLASSPATH%;%CATALINA_BASE%\bin\tomcat-juli.jar
+goto juliClasspathDone
+:juliClasspathHome
+set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\tomcat-juli.jar
+:juliClasspathDone
+
if not "%LOGGING_CONFIG%" == "" goto noJuliConfig
set LOGGING_CONFIG=-Dnop
if not exist "%CATALINA_BASE%\conf\logging.properties" goto noJuliConfig
CATALINA_TMPDIR="$CATALINA_BASE"/temp
fi
+# Add tomcat-juli.jar to classpath
+# tomcat-juli.jar can be over-ridden per instance
+if [ -r "$CATALINA_BASE/bin/tomcat-juli.jar" ] ; then
+ CLASSPATH=$CLASSPATH:$CATALINA_BASE/bin/tomcat-juli.jar
+else
+ CLASSPATH=$CLASSPATH:$CATALINA_HOME/bin/tomcat-juli.jar
+fi
+
# Bugzilla 37848: When no TTY is available, don't output to console
have_tty=0
if [ "`tty`" != "not a tty" ]; then
set PR_DESCRIPTION=Apache Tomcat @VERSION@ Server - http://tomcat.apache.org/
set PR_INSTALL=%EXECUTABLE%
set PR_LOGPATH=%CATALINA_BASE%\logs
-set PR_CLASSPATH=%CATALINA_HOME%\bin\bootstrap.jar
+set PR_CLASSPATH=%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_BASE%\bin\tomcat-juli.jar;%CATALINA_HOME%\bin\tomcat-juli.jar
rem Set the server jvm from JAVA_HOME
set PR_JVM=%JAVA_HOME%\jre\bin\server\jvm.dll
if exist "%PR_JVM%" goto foundJvm
Manifest-Version: 1.0
Main-Class: org.apache.catalina.startup.Bootstrap
-Class-Path: commons-daemon.jar tomcat-juli.jar tomcat-coyote.jar
+Class-Path: commons-daemon.jar tomcat-coyote.jar
Specification-Title: Catalina
Specification-Version: @VERSION_MAJOR_MINOR@
\ No newline at end of file
documentation</a> for more options. This page is intended only as a
bootstrapping guide.
</p>
-
+
+ <p>
+ If you have multiple instances of Tomcat, each with a separate
+ <code>$CATALINA_HOME</code> but a shared <code>$CATALINA_BASE</code> then
+ you can configure log4j on a per instance basis by replacing references to
+ <code>$CATALINA_HOME</code> in the above instructions with
+ <code>$CATALINA_BASE</code>. Note that you may need to create a
+ <code>$CATALINA_BASE/lib</code> directory.
+ </p>
</section>
</body>