new tomcat
This commit is contained in:
parent
879ecc62c4
commit
c568828cb8
256 changed files with 19009 additions and 235 deletions
BIN
tomcat/bin/bootstrap.jar
Normal file
BIN
tomcat/bin/bootstrap.jar
Normal file
Binary file not shown.
196
tomcat/bin/catalina.bat
Normal file
196
tomcat/bin/catalina.bat
Normal file
|
@ -0,0 +1,196 @@
|
|||
@echo off
|
||||
if "%OS%" == "Windows_NT" setlocal
|
||||
rem ---------------------------------------------------------------------------
|
||||
rem Start/Stop Script for the CATALINA Server
|
||||
rem
|
||||
rem Environment Variable Prequisites
|
||||
rem
|
||||
rem CATALINA_HOME May point at your Catalina "build" directory.
|
||||
rem
|
||||
rem CATALINA_BASE (Optional) Base directory for resolving dynamic portions
|
||||
rem of a Catalina installation. If not present, resolves to
|
||||
rem the same directory that CATALINA_HOME points to.
|
||||
rem
|
||||
rem CATALINA_OPTS (Optional) Java runtime options used when the "start",
|
||||
rem "stop", or "run" command is executed.
|
||||
rem
|
||||
rem CATALINA_TMPDIR (Optional) Directory path location of temporary directory
|
||||
rem the JVM should use (java.io.tmpdir). Defaults to
|
||||
rem %CATALINA_BASE%\temp.
|
||||
rem
|
||||
rem JAVA_HOME Must point at your Java Development Kit installation.
|
||||
rem
|
||||
rem JAVA_OPTS (Optional) Java runtime options used when the "start",
|
||||
rem "stop", or "run" command is executed.
|
||||
rem
|
||||
rem JSSE_HOME (Optional) May point at your Java Secure Sockets Extension
|
||||
rem (JSSE) installation, whose JAR files will be added to the
|
||||
rem system class path used to start Tomcat.
|
||||
rem
|
||||
rem JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
|
||||
rem command is executed. The default is "dt_shmem".
|
||||
rem
|
||||
rem JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start"
|
||||
rem command is executed. The default is "jdbconn".
|
||||
rem
|
||||
rem $Id: catalina.bat,v 1.3 2005/05/17 16:50:43 aranganath Exp $
|
||||
rem ---------------------------------------------------------------------------
|
||||
|
||||
rem Guess CATALINA_HOME if not defined
|
||||
set CURRENT_DIR=%cd%
|
||||
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||
set CATALINA_HOME=%CURRENT_DIR%
|
||||
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||
cd ..
|
||||
set CATALINA_HOME=%cd%
|
||||
cd %CURRENT_DIR%
|
||||
:gotHome
|
||||
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||
echo The CATALINA_HOME environment variable is not defined correctly
|
||||
echo This environment variable is needed to run this program
|
||||
goto end
|
||||
:okHome
|
||||
|
||||
rem Get standard environment variables
|
||||
if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat"
|
||||
|
||||
rem Get standard Java environment variables
|
||||
if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath
|
||||
echo Cannot find %CATALINA_HOME%\bin\setclasspath.bat
|
||||
echo This file is needed to run this program
|
||||
goto end
|
||||
:okSetclasspath
|
||||
set BASEDIR=%CATALINA_HOME%
|
||||
call "%CATALINA_HOME%\bin\setclasspath.bat"
|
||||
|
||||
rem Add on extra jar files to CLASSPATH
|
||||
if "%JSSE_HOME%" == "" goto noJsse
|
||||
set CLASSPATH=%CLASSPATH%;%JSSE_HOME%\lib\jcert.jar;%JSSE_HOME%\lib\jnet.jar;%JSSE_HOME%\lib\jsse.jar
|
||||
:noJsse
|
||||
set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar
|
||||
|
||||
if not "%CATALINA_BASE%" == "" goto gotBase
|
||||
set CATALINA_BASE=%CATALINA_HOME%
|
||||
:gotBase
|
||||
|
||||
if not "%CATALINA_TMPDIR%" == "" goto gotTmpdir
|
||||
set CATALINA_TMPDIR=%CATALINA_BASE%\temp
|
||||
:gotTmpdir
|
||||
|
||||
if not exist "%CATALINA_HOME%\bin\tomcat-juli.jar" goto noJuli
|
||||
set JAVA_OPTS=%JAVA_OPTS% -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
|
||||
:noJuli
|
||||
|
||||
rem ----- Execute The Requested Command ---------------------------------------
|
||||
|
||||
echo Using CATALINA_BASE: %CATALINA_BASE%
|
||||
echo Using CATALINA_HOME: %CATALINA_HOME%
|
||||
echo Using CATALINA_TMPDIR: %CATALINA_TMPDIR%
|
||||
echo Using JAVA_HOME: %JAVA_HOME%
|
||||
|
||||
set _EXECJAVA=%_RUNJAVA%
|
||||
set MAINCLASS=org.apache.catalina.startup.Bootstrap
|
||||
set ACTION=start
|
||||
set SECURITY_POLICY_FILE=
|
||||
set DEBUG_OPTS=
|
||||
set JPDA=
|
||||
|
||||
if not ""%1"" == ""jpda"" goto noJpda
|
||||
set JPDA=jpda
|
||||
if not "%JPDA_TRANSPORT%" == "" goto gotJpdaTransport
|
||||
set JPDA_TRANSPORT=dt_shmem
|
||||
:gotJpdaTransport
|
||||
if not "%JPDA_ADDRESS%" == "" goto gotJpdaAddress
|
||||
set JPDA_ADDRESS=jdbconn
|
||||
:gotJpdaAddress
|
||||
shift
|
||||
:noJpda
|
||||
|
||||
if ""%1"" == ""debug"" goto doDebug
|
||||
if ""%1"" == ""run"" goto doRun
|
||||
if ""%1"" == ""start"" goto doStart
|
||||
if ""%1"" == ""stop"" goto doStop
|
||||
if ""%1"" == ""version"" goto doVersion
|
||||
|
||||
echo Usage: catalina ( commands ... )
|
||||
echo commands:
|
||||
echo debug Start Catalina in a debugger
|
||||
echo debug -security Debug Catalina with a security manager
|
||||
echo jpda start Start Catalina under JPDA debugger
|
||||
echo run Start Catalina in the current window
|
||||
echo run -security Start in the current window with security manager
|
||||
echo start Start Catalina in a separate window
|
||||
echo start -security Start in a separate window with security manager
|
||||
echo stop Stop Catalina
|
||||
echo version What version of tomcat are you running?
|
||||
goto end
|
||||
|
||||
:doDebug
|
||||
shift
|
||||
set _EXECJAVA=%_RUNJDB%
|
||||
set DEBUG_OPTS=-sourcepath "%CATALINA_HOME%\..\..\jakarta-tomcat-catalina\catalina\src\share"
|
||||
if not ""%1"" == ""-security"" goto execCmd
|
||||
shift
|
||||
echo Using Security Manager
|
||||
set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
|
||||
goto execCmd
|
||||
|
||||
:doRun
|
||||
shift
|
||||
if not ""%1"" == ""-security"" goto execCmd
|
||||
shift
|
||||
echo Using Security Manager
|
||||
set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
|
||||
goto execCmd
|
||||
|
||||
:doStart
|
||||
shift
|
||||
if not "%OS%" == "Windows_NT" goto noTitle
|
||||
set _EXECJAVA=start "Tomcat" %_RUNJAVA%
|
||||
goto gotTitle
|
||||
:noTitle
|
||||
set _EXECJAVA=start %_RUNJAVA%
|
||||
:gotTitle
|
||||
if not ""%1"" == ""-security"" goto execCmd
|
||||
shift
|
||||
echo Using Security Manager
|
||||
set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
|
||||
goto execCmd
|
||||
|
||||
:doStop
|
||||
shift
|
||||
set ACTION=stop
|
||||
goto execCmd
|
||||
|
||||
:doVersion
|
||||
%_EXECJAVA% -classpath "%CATALINA_HOME%\server\lib\catalina.jar" org.apache.catalina.util.ServerInfo
|
||||
goto end
|
||||
|
||||
|
||||
:execCmd
|
||||
rem Get remaining unshifted command line arguments and save them in the
|
||||
set CMD_LINE_ARGS=
|
||||
:setArgs
|
||||
if ""%1""=="""" goto doneSetArgs
|
||||
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setArgs
|
||||
:doneSetArgs
|
||||
|
||||
rem Execute Java with the applicable properties
|
||||
if not "%JPDA%" == "" goto doJpda
|
||||
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity
|
||||
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
|
||||
goto end
|
||||
:doSecurity
|
||||
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
|
||||
goto end
|
||||
:doJpda
|
||||
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda
|
||||
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
|
||||
goto end
|
||||
:doSecurityJpda
|
||||
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
|
||||
goto end
|
||||
|
||||
:end
|
310
tomcat/bin/catalina.sh
Normal file
310
tomcat/bin/catalina.sh
Normal file
|
@ -0,0 +1,310 @@
|
|||
#!/bin/sh
|
||||
# -----------------------------------------------------------------------------
|
||||
# Start/Stop Script for the CATALINA Server
|
||||
#
|
||||
# Environment Variable Prequisites
|
||||
#
|
||||
# CATALINA_HOME May point at your Catalina "build" directory.
|
||||
#
|
||||
# CATALINA_BASE (Optional) Base directory for resolving dynamic portions
|
||||
# of a Catalina installation. If not present, resolves to
|
||||
# the same directory that CATALINA_HOME points to.
|
||||
#
|
||||
# CATALINA_OPTS (Optional) Java runtime options used when the "start",
|
||||
# "stop", or "run" command is executed.
|
||||
#
|
||||
# CATALINA_TMPDIR (Optional) Directory path location of temporary directory
|
||||
# the JVM should use (java.io.tmpdir). Defaults to
|
||||
# $CATALINA_BASE/temp.
|
||||
#
|
||||
# JAVA_HOME Must point at your Java Development Kit installation.
|
||||
# Required to run the with the "debug" or "javac" argument.
|
||||
#
|
||||
# JRE_HOME Must point at your Java Development Kit installation.
|
||||
# Defaults to JAVA_HOME if empty.
|
||||
#
|
||||
# JAVA_OPTS (Optional) Java runtime options used when the "start",
|
||||
# "stop", or "run" command is executed.
|
||||
#
|
||||
# JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
|
||||
# command is executed. The default is "dt_socket".
|
||||
#
|
||||
# JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start"
|
||||
# command is executed. The default is 8000.
|
||||
#
|
||||
# JSSE_HOME (Optional) May point at your Java Secure Sockets Extension
|
||||
# (JSSE) installation, whose JAR files will be added to the
|
||||
# system class path used to start Tomcat.
|
||||
#
|
||||
# CATALINA_PID (Optional) Path of the file which should contains the pid
|
||||
# of catalina startup java process, when start (fork) is used
|
||||
#
|
||||
# $Id: catalina.sh,v 1.3 2005/05/17 16:50:44 aranganath Exp $
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# OS specific support. $var _must_ be set to either true or false.
|
||||
cygwin=false
|
||||
os400=false
|
||||
case "`uname`" in
|
||||
CYGWIN*) cygwin=true;;
|
||||
OS400*) os400=true;;
|
||||
esac
|
||||
|
||||
# resolve links - $0 may be a softlink
|
||||
PRG="$0"
|
||||
|
||||
while [ -h "$PRG" ]; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '.*/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
# Get standard environment variables
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
|
||||
# Only set CATALINA_HOME if not already set
|
||||
[ -z "$CATALINA_HOME" ] && CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`
|
||||
|
||||
if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
|
||||
. "$CATALINA_HOME"/bin/setenv.sh
|
||||
fi
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||
if $cygwin; then
|
||||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
[ -n "$JRE_HOME" ] && JRE_HOME=`cygpath --unix "$JRE_HOME"`
|
||||
[ -n "$CATALINA_HOME" ] && CATALINA_HOME=`cygpath --unix "$CATALINA_HOME"`
|
||||
[ -n "$CATALINA_BASE" ] && CATALINA_BASE=`cygpath --unix "$CATALINA_BASE"`
|
||||
[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||
[ -n "$JSSE_HOME" ] && JSSE_HOME=`cygpath --absolute --unix "$JSSE_HOME"`
|
||||
fi
|
||||
|
||||
# For OS400
|
||||
if $os400; then
|
||||
# Set job priority to standard for interactive (interactive - 6) by using
|
||||
# the interactive priority - 6, the helper threads that respond to requests
|
||||
# will be running at the same priority as interactive jobs.
|
||||
COMMAND='chgjob job('$JOBNAME') runpty(6)'
|
||||
system $COMMAND
|
||||
|
||||
# Enable multi threading
|
||||
export QIBM_MULTI_THREADED=Y
|
||||
fi
|
||||
|
||||
# Get standard Java environment variables
|
||||
if $os400; then
|
||||
# -r will Only work on the os400 if the files are:
|
||||
# 1. owned by the user
|
||||
# 2. owned by the PRIMARY group of the user
|
||||
# this will not work if the user belongs in secondary groups
|
||||
BASEDIR="$CATALINA_HOME"
|
||||
. "$CATALINA_HOME"/bin/setclasspath.sh
|
||||
else
|
||||
if [ -r "$CATALINA_HOME"/bin/setclasspath.sh ]; then
|
||||
BASEDIR="$CATALINA_HOME"
|
||||
. "$CATALINA_HOME"/bin/setclasspath.sh
|
||||
else
|
||||
echo "Cannot find $CATALINA_HOME/bin/setclasspath.sh"
|
||||
echo "This file is needed to run this program"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set juli LogManager if it is present
|
||||
if [ -r "$CATALINA_HOME"/bin/tomcat-juli.jar ]; then
|
||||
JAVA_OPTS="$JAVA_OPTS "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
|
||||
fi
|
||||
|
||||
# Add on extra jar files to CLASSPATH
|
||||
if [ -n "$JSSE_HOME" ]; then
|
||||
CLASSPATH="$CLASSPATH":"$JSSE_HOME"/lib/jcert.jar:"$JSSE_HOME"/lib/jnet.jar:"$JSSE_HOME"/lib/jsse.jar
|
||||
fi
|
||||
CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar:"$CATALINA_HOME"/bin/commons-logging-api.jar
|
||||
|
||||
if [ -z "$CATALINA_BASE" ] ; then
|
||||
CATALINA_BASE="$CATALINA_HOME"
|
||||
fi
|
||||
|
||||
if [ -z "$CATALINA_TMPDIR" ] ; then
|
||||
# Define the java.io.tmpdir to use for Catalina
|
||||
CATALINA_TMPDIR="$CATALINA_BASE"/temp
|
||||
fi
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin; then
|
||||
JAVA_HOME=`cygpath --absolute --windows "$JAVA_HOME"`
|
||||
JRE_HOME=`cygpath --absolute --windows "$JRE_HOME"`
|
||||
CATALINA_HOME=`cygpath --absolute --windows "$CATALINA_HOME"`
|
||||
CATALINA_BASE=`cygpath --absolute --windows "$CATALINA_BASE"`
|
||||
CATALINA_TMPDIR=`cygpath --absolute --windows "$CATALINA_TMPDIR"`
|
||||
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||
[ -n "$JSSE_HOME" ] && JSSE_HOME=`cygpath --absolute --windows "$JSSE_HOME"`
|
||||
JAVA_ENDORSED_DIRS=`cygpath --path --windows "$JAVA_ENDORSED_DIRS"`
|
||||
fi
|
||||
|
||||
# ----- Execute The Requested Command -----------------------------------------
|
||||
|
||||
echo "Using CATALINA_BASE: $CATALINA_BASE"
|
||||
echo "Using CATALINA_HOME: $CATALINA_HOME"
|
||||
echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR"
|
||||
if [ "$1" = "debug" -o "$1" = "javac" ] ; then
|
||||
echo "Using JAVA_HOME: $JAVA_HOME"
|
||||
else
|
||||
echo "Using JRE_HOME: $JRE_HOME"
|
||||
fi
|
||||
|
||||
if [ "$1" = "jpda" ] ; then
|
||||
if [ -z "$JPDA_TRANSPORT" ]; then
|
||||
JPDA_TRANSPORT="dt_socket"
|
||||
fi
|
||||
if [ -z "$JPDA_ADDRESS" ]; then
|
||||
JPDA_ADDRESS="8000"
|
||||
fi
|
||||
if [ -z "$JPDA_OPTS" ]; then
|
||||
JPDA_OPTS="-Xdebug -Xrunjdwp:transport=$JPDA_TRANSPORT,address=$JPDA_ADDRESS,server=y,suspend=n"
|
||||
fi
|
||||
CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS"
|
||||
shift
|
||||
fi
|
||||
|
||||
if [ "$1" = "debug" ] ; then
|
||||
if $os400; then
|
||||
echo "Debug command not available on OS400"
|
||||
exit 1
|
||||
else
|
||||
shift
|
||||
if [ "$1" = "-security" ] ; then
|
||||
echo "Using Security Manager"
|
||||
shift
|
||||
exec "$_RUNJDB" $JAVA_OPTS $CATALINA_OPTS \
|
||||
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
|
||||
-sourcepath "$CATALINA_HOME"/../../jakarta-tomcat-catalina/catalina/src/share \
|
||||
-Djava.security.manager \
|
||||
-Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
|
||||
-Dcatalina.base="$CATALINA_BASE" \
|
||||
-Dcatalina.home="$CATALINA_HOME" \
|
||||
-Djava.io.tmpdir="$CATALINA_TMPDIR" \
|
||||
org.apache.catalina.startup.Bootstrap "$@" start
|
||||
else
|
||||
exec "$_RUNJDB" $JAVA_OPTS $CATALINA_OPTS \
|
||||
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
|
||||
-sourcepath "$CATALINA_HOME"/../../jakarta-tomcat-catalina/catalina/src/share \
|
||||
-Dcatalina.base="$CATALINA_BASE" \
|
||||
-Dcatalina.home="$CATALINA_HOME" \
|
||||
-Djava.io.tmpdir="$CATALINA_TMPDIR" \
|
||||
org.apache.catalina.startup.Bootstrap "$@" start
|
||||
fi
|
||||
fi
|
||||
|
||||
elif [ "$1" = "run" ]; then
|
||||
|
||||
shift
|
||||
if [ "$1" = "-security" ] ; then
|
||||
echo "Using Security Manager"
|
||||
shift
|
||||
exec "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
|
||||
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
|
||||
-Djava.security.manager \
|
||||
-Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
|
||||
-Dcatalina.base="$CATALINA_BASE" \
|
||||
-Dcatalina.home="$CATALINA_HOME" \
|
||||
-Djava.io.tmpdir="$CATALINA_TMPDIR" \
|
||||
org.apache.catalina.startup.Bootstrap "$@" start
|
||||
else
|
||||
exec "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
|
||||
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
|
||||
-Dcatalina.base="$CATALINA_BASE" \
|
||||
-Dcatalina.home="$CATALINA_HOME" \
|
||||
-Djava.io.tmpdir="$CATALINA_TMPDIR" \
|
||||
org.apache.catalina.startup.Bootstrap "$@" start
|
||||
fi
|
||||
|
||||
elif [ "$1" = "start" ] ; then
|
||||
|
||||
shift
|
||||
touch "$CATALINA_BASE"/logs/catalina.out
|
||||
if [ "$1" = "-security" ] ; then
|
||||
echo "Using Security Manager"
|
||||
shift
|
||||
"$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
|
||||
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
|
||||
-Djava.security.manager \
|
||||
-Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
|
||||
-Dcatalina.base="$CATALINA_BASE" \
|
||||
-Dcatalina.home="$CATALINA_HOME" \
|
||||
-Djava.io.tmpdir="$CATALINA_TMPDIR" \
|
||||
org.apache.catalina.startup.Bootstrap "$@" start \
|
||||
>> "$CATALINA_BASE"/logs/catalina.out 2>&1 &
|
||||
|
||||
if [ ! -z "$CATALINA_PID" ]; then
|
||||
echo $! > $CATALINA_PID
|
||||
fi
|
||||
else
|
||||
"$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
|
||||
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
|
||||
-Dcatalina.base="$CATALINA_BASE" \
|
||||
-Dcatalina.home="$CATALINA_HOME" \
|
||||
-Djava.io.tmpdir="$CATALINA_TMPDIR" \
|
||||
org.apache.catalina.startup.Bootstrap "$@" start \
|
||||
>> "$CATALINA_BASE"/logs/catalina.out 2>&1 &
|
||||
|
||||
if [ ! -z "$CATALINA_PID" ]; then
|
||||
echo $! > $CATALINA_PID
|
||||
fi
|
||||
fi
|
||||
|
||||
elif [ "$1" = "stop" ] ; then
|
||||
|
||||
shift
|
||||
FORCE=0
|
||||
if [ "$1" = "-force" ]; then
|
||||
shift
|
||||
FORCE=1
|
||||
fi
|
||||
|
||||
"$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
|
||||
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
|
||||
-Dcatalina.base="$CATALINA_BASE" \
|
||||
-Dcatalina.home="$CATALINA_HOME" \
|
||||
-Djava.io.tmpdir="$CATALINA_TMPDIR" \
|
||||
org.apache.catalina.startup.Bootstrap "$@" stop
|
||||
|
||||
if [ $FORCE -eq 1 ]; then
|
||||
if [ ! -z "$CATALINA_PID" ]; then
|
||||
echo "Killing: `cat $CATALINA_PID`"
|
||||
kill -9 `cat $CATALINA_PID`
|
||||
fi
|
||||
fi
|
||||
|
||||
elif [ "$1" = "version" ] ; then
|
||||
|
||||
"$_RUNJAVA" \
|
||||
-classpath "$CATALINA_HOME/server/lib/catalina.jar" \
|
||||
org.apache.catalina.util.ServerInfo
|
||||
|
||||
else
|
||||
|
||||
echo "Usage: catalina.sh ( commands ... )"
|
||||
echo "commands:"
|
||||
if $os400; then
|
||||
echo " debug Start Catalina in a debugger (not available on OS400)"
|
||||
echo " debug -security Debug Catalina with a security manager (not available on OS400)"
|
||||
else
|
||||
echo " debug Start Catalina in a debugger"
|
||||
echo " debug -security Debug Catalina with a security manager"
|
||||
fi
|
||||
echo " jpda start Start Catalina under JPDA debugger"
|
||||
echo " run Start Catalina in the current window"
|
||||
echo " run -security Start in the current window with security manager"
|
||||
echo " start Start Catalina in a separate window"
|
||||
echo " start -security Start in a separate window with security manager"
|
||||
echo " stop Stop Catalina"
|
||||
echo " stop -force Stop Catalina (followed by kill -KILL)"
|
||||
echo " version What version of tomcat are you running?"
|
||||
exit 1
|
||||
|
||||
fi
|
BIN
tomcat/bin/commons-daemon.jar
Normal file
BIN
tomcat/bin/commons-daemon.jar
Normal file
Binary file not shown.
BIN
tomcat/bin/commons-logging-api.jar
Normal file
BIN
tomcat/bin/commons-logging-api.jar
Normal file
Binary file not shown.
19
tomcat/bin/cpappend.bat
Normal file
19
tomcat/bin/cpappend.bat
Normal file
|
@ -0,0 +1,19 @@
|
|||
rem ---------------------------------------------------------------------------
|
||||
rem Append to CLASSPATH
|
||||
rem
|
||||
rem $Id: cpappend.bat,v 1.3 2005/05/17 16:50:45 aranganath Exp $
|
||||
rem ---------------------------------------------------------------------------
|
||||
|
||||
rem Process the first argument
|
||||
if ""%1"" == """" goto end
|
||||
set CLASSPATH=%CLASSPATH%;%1
|
||||
shift
|
||||
|
||||
rem Process the remaining arguments
|
||||
:setArgs
|
||||
if ""%1"" == """" goto doneSetArgs
|
||||
set CLASSPATH=%CLASSPATH% %1
|
||||
shift
|
||||
goto setArgs
|
||||
:doneSetArgs
|
||||
:end
|
41
tomcat/bin/digest.bat
Normal file
41
tomcat/bin/digest.bat
Normal file
|
@ -0,0 +1,41 @@
|
|||
@echo off
|
||||
if "%OS%" == "Windows_NT" setlocal
|
||||
rem ---------------------------------------------------------------------------
|
||||
rem Script to digest password using the algorithm specified
|
||||
rem
|
||||
rem $Id: digest.bat,v 1.3 2005/05/17 16:50:44 aranganath Exp $
|
||||
rem ---------------------------------------------------------------------------
|
||||
|
||||
rem Guess CATALINA_HOME if not defined
|
||||
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||
set CATALINA_HOME=.
|
||||
if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
|
||||
set CATALINA_HOME=..
|
||||
:gotHome
|
||||
if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
|
||||
echo The CATALINA_HOME environment variable is not defined correctly
|
||||
echo This environment variable is needed to run this program
|
||||
goto end
|
||||
:okHome
|
||||
|
||||
set EXECUTABLE=%CATALINA_HOME%\bin\tool-wrapper.bat
|
||||
|
||||
rem Check that target executable exists
|
||||
if exist "%EXECUTABLE%" goto okExec
|
||||
echo Cannot find %EXECUTABLE%
|
||||
echo This file is needed to run this program
|
||||
goto end
|
||||
:okExec
|
||||
|
||||
rem Get remaining unshifted command line arguments and save them in the
|
||||
set CMD_LINE_ARGS=
|
||||
:setArgs
|
||||
if ""%1""=="""" goto doneSetArgs
|
||||
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setArgs
|
||||
:doneSetArgs
|
||||
|
||||
call "%EXECUTABLE%" -server org.apache.catalina.realm.RealmBase %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
31
tomcat/bin/digest.sh
Normal file
31
tomcat/bin/digest.sh
Normal file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/sh
|
||||
# -----------------------------------------------------------------------------
|
||||
# Script to digest password using the algorithm specified
|
||||
#
|
||||
# $Id: digest.sh,v 1.3 2005/05/17 16:50:45 aranganath Exp $
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# resolve links - $0 may be a softlink
|
||||
PRG="$0"
|
||||
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '.*/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
EXECUTABLE=tool-wrapper.sh
|
||||
|
||||
# Check that target executable exists
|
||||
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
|
||||
echo "Cannot find $PRGDIR/$EXECUTABLE"
|
||||
echo "This file is needed to run this program"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec "$PRGDIR"/"$EXECUTABLE" -server org.apache.catalina.realm.RealmBase "$@"
|
BIN
tomcat/bin/jmx.jar
Normal file
BIN
tomcat/bin/jmx.jar
Normal file
Binary file not shown.
BIN
tomcat/bin/jsvc.tar.gz
Normal file
BIN
tomcat/bin/jsvc.tar.gz
Normal file
Binary file not shown.
111
tomcat/bin/service.bat
Normal file
111
tomcat/bin/service.bat
Normal file
|
@ -0,0 +1,111 @@
|
|||
@echo off
|
||||
if "%OS%" == "Windows_NT" setlocal
|
||||
rem ---------------------------------------------------------------------------
|
||||
rem NT Service Install/Uninstall script
|
||||
rem
|
||||
rem Options
|
||||
rem install Install the service using Tomcat5 as service name.
|
||||
rem Service is installed using default settings.
|
||||
rem remove Remove the service from the System.
|
||||
rem
|
||||
rem name (optional) If the second argument is present it is considered
|
||||
rem to be new service name
|
||||
rem
|
||||
rem $Id: service.bat,v 1.3 2005/05/17 16:50:44 aranganath Exp $
|
||||
rem ---------------------------------------------------------------------------
|
||||
|
||||
rem Guess CATALINA_HOME if not defined
|
||||
set CURRENT_DIR=%cd%
|
||||
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||
set CATALINA_HOME=%cd%
|
||||
if exist "%CATALINA_HOME%\bin\tomcat5.exe" goto okHome
|
||||
rem CD to the upper dir
|
||||
cd ..
|
||||
set CATALINA_HOME=%cd%
|
||||
:gotHome
|
||||
if exist "%CATALINA_HOME%\bin\tomcat5.exe" goto okHome
|
||||
echo The tomcat.exe was not found...
|
||||
echo The CATALINA_HOME environment variable is not defined correctly.
|
||||
echo This environment variable is needed to run this program
|
||||
goto end
|
||||
rem Make sure prerequisite environment variables are set
|
||||
if not "%JAVA_HOME%" == "" goto okHome
|
||||
echo The JAVA_HOME environment variable is not defined
|
||||
echo This environment variable is needed to run this program
|
||||
goto end
|
||||
:okHome
|
||||
if not "%CATALINA_BASE%" == "" goto gotBase
|
||||
set CATALINA_BASE=%CATALINA_HOME%
|
||||
:gotBase
|
||||
|
||||
set EXECUTABLE=%CATALINA_HOME%\bin\tomcat5.exe
|
||||
|
||||
rem Set default Service name
|
||||
set SERVICE_NAME=Tomcat5
|
||||
set PR_DISPLAYNAME=Apache Tomcat
|
||||
|
||||
if "%1" == "" goto displayUsage
|
||||
if "%2" == "" goto setServiceName
|
||||
set SERVICE_NAME=%2
|
||||
set PR_DISPLAYNAME=Apache Tomcat %2
|
||||
:setServiceName
|
||||
if %1 == install goto doInstall
|
||||
if %1 == remove goto doRemove
|
||||
if %1 == uninstall goto doRemove
|
||||
echo Unknown parameter "%1"
|
||||
:displayUsage
|
||||
echo
|
||||
echo Usage: service.bat install/remove [service_name]
|
||||
goto end
|
||||
|
||||
:doRemove
|
||||
rem Remove the service
|
||||
"%EXECUTABLE%" //DS//%SERVICE_NAME%
|
||||
echo The service '%SERVICE_NAME%' has been removed
|
||||
goto end
|
||||
|
||||
:doInstall
|
||||
rem Install the service
|
||||
echo Installing the service '%SERVICE_NAME%' ...
|
||||
echo Using CATALINA_HOME: %CATALINA_HOME%
|
||||
echo Using JAVA_HOME: %JAVA_HOME%
|
||||
|
||||
rem Use the environment variables as an exaple
|
||||
rem Each command line option is prefixed with PR_
|
||||
|
||||
set PR_DESCRIPTION=Apache Tomcat Server - http://jakarta.apache.org/tomcat
|
||||
set PR_INSTALL=%EXECUTABLE%
|
||||
set PR_LOGPATH=%CATALINA_HOME%\logs
|
||||
set PR_CLASSPATH=%CATALINA_HOME%\bin\bootstrap.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
|
||||
rem Set the client jvm from JAVA_HOME
|
||||
set PR_JVM=%JAVA_HOME%\jre\bin\client\jvm.dll
|
||||
if exist "%PR_JVM%" goto foundJvm
|
||||
set PR_JVM=auto
|
||||
:foundJvm
|
||||
echo Using JVM: %PR_JVM%
|
||||
"%EXECUTABLE%" //IS//%SERVICE_NAME% --StartClass org.apache.catalina.startup.Bootstrap --StopClass org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop
|
||||
if not errorlevel 1 goto installed
|
||||
echo Failed installing '%SERVICE_NAME%' service
|
||||
goto end
|
||||
:installed
|
||||
rem Clear the environment variables. They are not needed any more.
|
||||
set PR_DISPLAYNAME=
|
||||
set PR_DESCRIPTION=
|
||||
set PR_INSTALL=
|
||||
set PR_LOGPATH=
|
||||
set PR_CLASSPATH=
|
||||
set PR_JVM=
|
||||
rem Set extra parameters
|
||||
"%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions "-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\common\endorsed" --StartMode jvm --StopMode jvm
|
||||
rem More extra parameters
|
||||
set PR_LOGPATH=%CATALINA_HOME%\logs
|
||||
set PR_STDOUTPUT=auto
|
||||
set PR_STDERROR=auto
|
||||
"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp" --JvmMs 128 --JvmMx 256
|
||||
echo The service '%SERVICE_NAME%' has been installed.
|
||||
|
||||
:end
|
||||
cd %CURRENT_DIR%
|
57
tomcat/bin/setclasspath.bat
Normal file
57
tomcat/bin/setclasspath.bat
Normal file
|
@ -0,0 +1,57 @@
|
|||
rem ---------------------------------------------------------------------------
|
||||
rem Set CLASSPATH and Java options
|
||||
rem
|
||||
rem $Id: setclasspath.bat,v 1.3 2005/05/17 16:50:45 aranganath Exp $
|
||||
rem ---------------------------------------------------------------------------
|
||||
|
||||
rem Make sure prerequisite environment variables are set
|
||||
if not "%JAVA_HOME%" == "" goto gotJavaHome
|
||||
echo The JAVA_HOME environment variable is not defined
|
||||
echo This environment variable is needed to run this program
|
||||
goto exit
|
||||
:gotJavaHome
|
||||
if not exist "%JAVA_HOME%\bin\java.exe" goto noJavaHome
|
||||
if not exist "%JAVA_HOME%\bin\javaw.exe" goto noJavaHome
|
||||
if not exist "%JAVA_HOME%\bin\jdb.exe" goto noJavaHome
|
||||
if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavaHome
|
||||
goto okJavaHome
|
||||
:noJavaHome
|
||||
echo The JAVA_HOME environment variable is not defined correctly
|
||||
echo This environment variable is needed to run this program
|
||||
echo NB: JAVA_HOME should point to a JDK not a JRE
|
||||
goto exit
|
||||
:okJavaHome
|
||||
|
||||
if not "%BASEDIR%" == "" goto gotBasedir
|
||||
echo The BASEDIR environment variable is not defined
|
||||
echo This environment variable is needed to run this program
|
||||
goto exit
|
||||
:gotBasedir
|
||||
if exist "%BASEDIR%\bin\setclasspath.bat" goto okBasedir
|
||||
echo The BASEDIR environment variable is not defined correctly
|
||||
echo This environment variable is needed to run this program
|
||||
goto exit
|
||||
:okBasedir
|
||||
|
||||
rem Set the default -Djava.endorsed.dirs argument
|
||||
set JAVA_ENDORSED_DIRS=%BASEDIR%\common\endorsed
|
||||
|
||||
rem Set standard CLASSPATH
|
||||
rem Note that there are no quotes as we do not want to introduce random
|
||||
rem quotes into the CLASSPATH
|
||||
set CLASSPATH=%JAVA_HOME%\lib\tools.jar
|
||||
|
||||
rem Set standard command for invoking Java.
|
||||
rem Note that NT requires a window name argument when using start.
|
||||
rem Also note the quoting as JAVA_HOME may contain spaces.
|
||||
set _RUNJAVA="%JAVA_HOME%\bin\java"
|
||||
set _RUNJAVAW="%JAVA_HOME%\bin\javaw"
|
||||
set _RUNJDB="%JAVA_HOME%\bin\jdb"
|
||||
set _RUNJAVAC="%JAVA_HOME%\bin\javac"
|
||||
|
||||
goto end
|
||||
|
||||
:exit
|
||||
exit /b 1
|
||||
|
||||
:end
|
85
tomcat/bin/setclasspath.sh
Normal file
85
tomcat/bin/setclasspath.sh
Normal file
|
@ -0,0 +1,85 @@
|
|||
# -----------------------------------------------------------------------------
|
||||
# Set CLASSPATH and Java options
|
||||
#
|
||||
# $Id: setclasspath.sh,v 1.3 2005/05/17 16:50:43 aranganath Exp $
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# First clear out the user classpath
|
||||
CLASSPATH=
|
||||
|
||||
# Make sure prerequisite environment variables are set
|
||||
if [ -z "$JAVA_HOME" -a -z "$JRE_HOME" ]; then
|
||||
echo "Neither the JAVA_HOME nor the JRE_HOME environment variable is defined"
|
||||
echo "At least one of these environment variable is needed to run this program"
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$JAVA_HOME" -a "$1" = "debug" ]; then
|
||||
echo "JAVA_HOME should point to a JDK in order to run in debug mode."
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$JRE_HOME" ]; then
|
||||
JRE_HOME="$JAVA_HOME"
|
||||
fi
|
||||
|
||||
# If we're running under jdb, we need a full jdk.
|
||||
if [ "$1" = "debug" -o "$1" = "javac" ] ; then
|
||||
if [ "$os400" = "true" ]; then
|
||||
if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/javac ]; then
|
||||
echo "The JAVA_HOME environment variable is not defined correctly"
|
||||
echo "This environment variable is needed to run this program"
|
||||
echo "NB: JAVA_HOME should point to a JDK not a JRE"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
if [ ! -x "$JAVA_HOME"/bin/java -o ! -x "$JAVA_HOME"/bin/jdb -o ! -x "$JAVA_HOME"/bin/javac ]; then
|
||||
echo "The JAVA_HOME environment variable is not defined correctly"
|
||||
echo "This environment variable is needed to run this program"
|
||||
echo "NB: JAVA_HOME should point to a JDK not a JRE"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if [ -z "$BASEDIR" ]; then
|
||||
echo "The BASEDIR environment variable is not defined"
|
||||
echo "This environment variable is needed to run this program"
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -x "$BASEDIR"/bin/setclasspath.sh ]; then
|
||||
if $os400; then
|
||||
# -x will Only work on the os400 if the files are:
|
||||
# 1. owned by the user
|
||||
# 2. owned by the PRIMARY group of the user
|
||||
# this will not work if the user belongs in secondary groups
|
||||
eval
|
||||
else
|
||||
echo "The BASEDIR environment variable is not defined correctly"
|
||||
echo "This environment variable is needed to run this program"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set the default -Djava.endorsed.dirs argument
|
||||
JAVA_ENDORSED_DIRS="$BASEDIR"/common/endorsed
|
||||
|
||||
# Set standard CLASSPATH
|
||||
if [ "$1" = "debug" -o "$1" = "javac" ] ; then
|
||||
CLASSPATH="$JAVA_HOME"/lib/tools.jar
|
||||
fi
|
||||
|
||||
# OSX hack to CLASSPATH
|
||||
JIKESPATH=
|
||||
if [ `uname -s` = "Darwin" ]; then
|
||||
OSXHACK="/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Classes"
|
||||
if [ -d "$OSXHACK" ]; then
|
||||
for i in "$OSXHACK"/*.jar; do
|
||||
JIKESPATH="$JIKESPATH":"$i"
|
||||
done
|
||||
fi
|
||||
fi
|
||||
|
||||
# Set standard commands for invoking Java.
|
||||
_RUNJAVA="$JRE_HOME"/bin/java
|
||||
if [ "$os400" != "true" ]; then
|
||||
_RUNJDB="$JAVA_HOME"/bin/jdb
|
||||
fi
|
||||
_RUNJAVAC="$JAVA_HOME"/bin/javac
|
44
tomcat/bin/shutdown.bat
Normal file
44
tomcat/bin/shutdown.bat
Normal file
|
@ -0,0 +1,44 @@
|
|||
@echo off
|
||||
if "%OS%" == "Windows_NT" setlocal
|
||||
rem ---------------------------------------------------------------------------
|
||||
rem Stop script for the CATALINA Server
|
||||
rem
|
||||
rem $Id: shutdown.bat,v 1.3 2005/05/17 16:50:43 aranganath Exp $
|
||||
rem ---------------------------------------------------------------------------
|
||||
|
||||
rem Guess CATALINA_HOME if not defined
|
||||
set CURRENT_DIR=%cd%
|
||||
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||
set CATALINA_HOME=%CURRENT_DIR%
|
||||
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||
cd ..
|
||||
set CATALINA_HOME=%cd%
|
||||
cd %CURRENT_DIR%
|
||||
:gotHome
|
||||
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||
echo The CATALINA_HOME environment variable is not defined correctly
|
||||
echo This environment variable is needed to run this program
|
||||
goto end
|
||||
:okHome
|
||||
|
||||
set EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat
|
||||
|
||||
rem Check that target executable exists
|
||||
if exist "%EXECUTABLE%" goto okExec
|
||||
echo Cannot find %EXECUTABLE%
|
||||
echo This file is needed to run this program
|
||||
goto end
|
||||
:okExec
|
||||
|
||||
rem Get remaining unshifted command line arguments and save them in the
|
||||
set CMD_LINE_ARGS=
|
||||
:setArgs
|
||||
if ""%1""=="""" goto doneSetArgs
|
||||
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setArgs
|
||||
:doneSetArgs
|
||||
|
||||
call "%EXECUTABLE%" stop %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
31
tomcat/bin/shutdown.sh
Normal file
31
tomcat/bin/shutdown.sh
Normal file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/sh
|
||||
# -----------------------------------------------------------------------------
|
||||
# Stop script for the CATALINA Server
|
||||
#
|
||||
# $Id: shutdown.sh,v 1.3 2005/05/17 16:50:43 aranganath Exp $
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# resolve links - $0 may be a softlink
|
||||
PRG="$0"
|
||||
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '.*/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
EXECUTABLE=catalina.sh
|
||||
|
||||
# Check that target executable exists
|
||||
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
|
||||
echo "Cannot find $PRGDIR/$EXECUTABLE"
|
||||
echo "This file is needed to run this program"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec "$PRGDIR"/"$EXECUTABLE" stop "$@"
|
44
tomcat/bin/startup.bat
Normal file
44
tomcat/bin/startup.bat
Normal file
|
@ -0,0 +1,44 @@
|
|||
@echo off
|
||||
if "%OS%" == "Windows_NT" setlocal
|
||||
rem ---------------------------------------------------------------------------
|
||||
rem Start script for the CATALINA Server
|
||||
rem
|
||||
rem $Id: startup.bat,v 1.3 2005/05/17 16:50:45 aranganath Exp $
|
||||
rem ---------------------------------------------------------------------------
|
||||
|
||||
rem Guess CATALINA_HOME if not defined
|
||||
set CURRENT_DIR=%cd%
|
||||
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||
set CATALINA_HOME=%CURRENT_DIR%
|
||||
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||
cd ..
|
||||
set CATALINA_HOME=%cd%
|
||||
cd %CURRENT_DIR%
|
||||
:gotHome
|
||||
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||
echo The CATALINA_HOME environment variable is not defined correctly
|
||||
echo This environment variable is needed to run this program
|
||||
goto end
|
||||
:okHome
|
||||
|
||||
set EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat
|
||||
|
||||
rem Check that target executable exists
|
||||
if exist "%EXECUTABLE%" goto okExec
|
||||
echo Cannot find %EXECUTABLE%
|
||||
echo This file is needed to run this program
|
||||
goto end
|
||||
:okExec
|
||||
|
||||
rem Get remaining unshifted command line arguments and save them in the
|
||||
set CMD_LINE_ARGS=
|
||||
:setArgs
|
||||
if ""%1""=="""" goto doneSetArgs
|
||||
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setArgs
|
||||
:doneSetArgs
|
||||
|
||||
call "%EXECUTABLE%" start %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
46
tomcat/bin/startup.sh
Normal file
46
tomcat/bin/startup.sh
Normal file
|
@ -0,0 +1,46 @@
|
|||
#!/bin/sh
|
||||
# -----------------------------------------------------------------------------
|
||||
# Start Script for the CATALINA Server
|
||||
#
|
||||
# $Id: startup.sh,v 1.3 2005/05/17 16:50:45 aranganath Exp $
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# Better OS/400 detection: see Bugzilla 31132
|
||||
os400=false
|
||||
case "`uname`" in
|
||||
CYGWIN*) cygwin=true;;
|
||||
OS400*) os400=true;;
|
||||
esac
|
||||
|
||||
# resolve links - $0 may be a softlink
|
||||
PRG="$0"
|
||||
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '.*/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
EXECUTABLE=catalina.sh
|
||||
|
||||
# Check that target executable exists
|
||||
if $os400; then
|
||||
# -x will Only work on the os400 if the files are:
|
||||
# 1. owned by the user
|
||||
# 2. owned by the PRIMARY group of the user
|
||||
# this will not work if the user belongs in secondary groups
|
||||
eval
|
||||
else
|
||||
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
|
||||
echo "Cannot find $PRGDIR/$EXECUTABLE"
|
||||
echo "This file is needed to run this program"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
exec "$PRGDIR"/"$EXECUTABLE" start "$@"
|
BIN
tomcat/bin/tomcat-juli.jar
Normal file
BIN
tomcat/bin/tomcat-juli.jar
Normal file
Binary file not shown.
59
tomcat/bin/tool-wrapper.bat
Normal file
59
tomcat/bin/tool-wrapper.bat
Normal file
|
@ -0,0 +1,59 @@
|
|||
@echo off
|
||||
if "%OS%" == "Windows_NT" setlocal
|
||||
rem ---------------------------------------------------------------------------
|
||||
rem Wrapper script for command line tools
|
||||
rem
|
||||
rem Environment Variable Prequisites
|
||||
rem
|
||||
rem CATALINA_HOME May point at your Catalina "build" directory.
|
||||
rem
|
||||
rem TOOL_OPTS (Optional) Java runtime options used when the "start",
|
||||
rem "stop", or "run" command is executed.
|
||||
rem
|
||||
rem JAVA_HOME Must point at your Java Development Kit installation.
|
||||
rem
|
||||
rem JAVA_OPTS (Optional) Java runtime options used when the "start",
|
||||
rem "stop", or "run" command is executed.
|
||||
rem
|
||||
rem $Id: tool-wrapper.bat,v 1.3 2005/05/17 16:50:43 aranganath Exp $
|
||||
rem ---------------------------------------------------------------------------
|
||||
|
||||
rem Guess CATALINA_HOME if not defined
|
||||
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||
set CATALINA_HOME=.
|
||||
if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
|
||||
set CATALINA_HOME=..
|
||||
:gotHome
|
||||
if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome
|
||||
echo The CATALINA_HOME environment variable is not defined correctly
|
||||
echo This environment variable is needed to run this program
|
||||
goto end
|
||||
:okHome
|
||||
|
||||
rem Get standard environment variables
|
||||
if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat"
|
||||
|
||||
rem Get standard Java environment variables
|
||||
if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath
|
||||
echo Cannot find %CATALINA_HOME%\bin\setclasspath.bat
|
||||
echo This file is needed to run this program
|
||||
goto end
|
||||
:okSetclasspath
|
||||
set BASEDIR=%CATALINA_HOME%
|
||||
call "%CATALINA_HOME%\bin\setclasspath.bat"
|
||||
|
||||
rem Add on extra jar files to CLASSPATH
|
||||
set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar;"%BASEDIR%"\common\lib\jmx.jar;"%BASEDIR%"\common\lib\servlet-api.jar
|
||||
|
||||
rem Get remaining unshifted command line arguments and save them in the
|
||||
set CMD_LINE_ARGS=
|
||||
:setArgs
|
||||
if ""%1""=="""" goto doneSetArgs
|
||||
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setArgs
|
||||
:doneSetArgs
|
||||
|
||||
%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
78
tomcat/bin/tool-wrapper.sh
Normal file
78
tomcat/bin/tool-wrapper.sh
Normal file
|
@ -0,0 +1,78 @@
|
|||
#!/bin/sh
|
||||
# -----------------------------------------------------------------------------
|
||||
# Wrapper script for command line tools
|
||||
#
|
||||
# Environment Variable Prequisites
|
||||
#
|
||||
# CATALINA_HOME May point at your Catalina "build" directory.
|
||||
#
|
||||
# TOOL_OPTS (Optional) Java runtime options used when the "start",
|
||||
# "stop", or "run" command is executed.
|
||||
#
|
||||
# JAVA_HOME Must point at your Java Development Kit installation.
|
||||
#
|
||||
# JAVA_OPTS (Optional) Java runtime options used when the "start",
|
||||
# "stop", or "run" command is executed.
|
||||
#
|
||||
# $Id: tool-wrapper.sh,v 1.3 2005/05/17 16:50:45 aranganath Exp $
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# OS specific support. $var _must_ be set to either true or false.
|
||||
cygwin=false
|
||||
case "`uname`" in
|
||||
CYGWIN*) cygwin=true;;
|
||||
esac
|
||||
|
||||
# resolve links - $0 may be a softlink
|
||||
PRG="$0"
|
||||
|
||||
while [ -h "$PRG" ]; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '.*/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
# Get standard environment variables
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
CATALINA_HOME=`cd "$PRGDIR/.." ; pwd`
|
||||
if [ -r "$CATALINA_HOME"/bin/setenv.sh ]; then
|
||||
. "$CATALINA_HOME"/bin/setenv.sh
|
||||
fi
|
||||
|
||||
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
||||
if $cygwin; then
|
||||
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
||||
[ -n "$CATALINA_HOME" ] && CATALINA_HOME=`cygpath --unix "$CATALINA_HOME"`
|
||||
[ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
||||
fi
|
||||
|
||||
# Get standard Java environment variables
|
||||
if [ -r "$CATALINA_HOME"/bin/setclasspath.sh ]; then
|
||||
BASEDIR="$CATALINA_HOME"
|
||||
. "$CATALINA_HOME"/bin/setclasspath.sh
|
||||
else
|
||||
echo "Cannot find $CATALINA_HOME/bin/setclasspath.sh"
|
||||
echo "This file is needed to run this program"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Add on extra jar files to CLASSPATH
|
||||
CLASSPATH="$CLASSPATH":"$CATALINA_HOME"/bin/bootstrap.jar:"$BASEDIR"/common/lib/jmx.jar:"$BASEDIR"/common/lib/servlet-api.jar
|
||||
|
||||
# For Cygwin, switch paths to Windows format before running java
|
||||
if $cygwin; then
|
||||
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
||||
CATALINA_HOME=`cygpath --path --windows "$CATALINA_HOME"`
|
||||
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
||||
fi
|
||||
|
||||
# ----- Execute The Requested Command -----------------------------------------
|
||||
|
||||
exec "$_RUNJAVA" $JAVA_OPTS $TOOL_OPTS \
|
||||
-Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
|
||||
-Dcatalina.home="$CATALINA_HOME" \
|
||||
org.apache.catalina.startup.Tool "$@"
|
44
tomcat/bin/version.bat
Normal file
44
tomcat/bin/version.bat
Normal file
|
@ -0,0 +1,44 @@
|
|||
@echo off
|
||||
if "%OS%" == "Windows_NT" setlocal
|
||||
rem ---------------------------------------------------------------------------
|
||||
rem Version script for the CATALINA Server
|
||||
rem
|
||||
rem $Id: version.bat,v 1.3 2005/05/17 16:50:43 aranganath Exp $
|
||||
rem ---------------------------------------------------------------------------
|
||||
|
||||
rem Guess CATALINA_HOME if not defined
|
||||
set CURRENT_DIR=%cd%
|
||||
if not "%CATALINA_HOME%" == "" goto gotHome
|
||||
set CATALINA_HOME=%CURRENT_DIR%
|
||||
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||
cd ..
|
||||
set CATALINA_HOME=%cd%
|
||||
cd %CURRENT_DIR%
|
||||
:gotHome
|
||||
if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
|
||||
echo The CATALINA_HOME environment variable is not defined correctly
|
||||
echo This environment variable is needed to run this program
|
||||
goto end
|
||||
:okHome
|
||||
|
||||
set EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat
|
||||
|
||||
rem Check that target executable exists
|
||||
if exist "%EXECUTABLE%" goto okExec
|
||||
echo Cannot find %EXECUTABLE%
|
||||
echo This file is needed to run this program
|
||||
goto end
|
||||
:okExec
|
||||
|
||||
rem Get remaining unshifted command line arguments and save them in the
|
||||
set CMD_LINE_ARGS=
|
||||
:setArgs
|
||||
if ""%1""=="""" goto doneSetArgs
|
||||
set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1
|
||||
shift
|
||||
goto setArgs
|
||||
:doneSetArgs
|
||||
|
||||
call "%EXECUTABLE%" version %CMD_LINE_ARGS%
|
||||
|
||||
:end
|
31
tomcat/bin/version.sh
Normal file
31
tomcat/bin/version.sh
Normal file
|
@ -0,0 +1,31 @@
|
|||
#!/bin/sh
|
||||
# -----------------------------------------------------------------------------
|
||||
# Version Script for the CATALINA Server
|
||||
#
|
||||
# $Id: version.sh,v 1.3 2005/05/17 16:50:43 aranganath Exp $
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
# resolve links - $0 may be a softlink
|
||||
PRG="$0"
|
||||
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '.*/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`/"$link"
|
||||
fi
|
||||
done
|
||||
|
||||
PRGDIR=`dirname "$PRG"`
|
||||
EXECUTABLE=catalina.sh
|
||||
|
||||
# Check that target executable exists
|
||||
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
|
||||
echo "Cannot find $PRGDIR/$EXECUTABLE"
|
||||
echo "This file is needed to run this program"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec "$PRGDIR"/"$EXECUTABLE" version "$@"
|
Loading…
Add table
Add a link
Reference in a new issue