cvs commit: jakarta-tomcat/src/shell tomcat.sh tomcat.bat
hgomez 2003/10/13 02:45:41 Modified:src/shell tomcat.sh tomcat.bat Log: Add use of endorsed lib in run scripts Revision ChangesPath 1.38 +14 -11jakarta-tomcat/src/shell/tomcat.sh Index: tomcat.sh === RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.sh,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- tomcat.sh 6 Mar 2003 16:30:45 - 1.37 +++ tomcat.sh 13 Oct 2003 09:45:41 - 1.38 @@ -47,6 +47,9 @@ [ -n $CLASSPATH ] CLASSPATH=`cygpath --path --unix $CLASSPATH` fi +# Set the default -Djava.endorsed.dirs argument +JAVA_ENDORSED_DIRS=$TOMCAT_HOME/lib/endorsed + # Read local properties if [ -f $HOME/.tomcatrc ] ; then . $HOME/.tomcatrc @@ -209,7 +212,7 @@ if [ $1 = -noout ] ; then shift -$JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN start $@ ${TOMCAT_HOME}/logs/stdout.log 21 +$JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -Dtomcat.home=${TOMCAT_HOME} $MAIN start $@ ${TOMCAT_HOME}/logs/stdout.log 21 if [ ! -z $TOMCAT_PID ]; then echo $! $TOMCAT_PID @@ -219,7 +222,7 @@ echo Using classpath: ${CLASSPATH} echo Using JAVA_HOME: ${JAVA_HOME} echo Using TOMCAT_HOME: ${TOMCAT_HOME} -$JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN start $@ +$JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -Dtomcat.home=${TOMCAT_HOME} $MAIN start $@ if [ ! -z $TOMCAT_PID ]; then echo $! $TOMCAT_PID @@ -248,7 +251,7 @@ echo Using classpath: ${CLASSPATH} echo Using JAVA_HOME: ${JAVA_HOME} echo Using TOMCAT_HOME: ${TOMCAT_HOME} - $JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN stop $@ + $JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -Dtomcat.home=${TOMCAT_HOME} $MAIN stop $@ if [ $1 = -force ] ; then shift @@ -260,26 +263,26 @@ shift # Backward compat if [ $1 = enableAdmin ] ; then -$JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN enableAdmin $@ +$JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -Dtomcat.home=${TOMCAT_HOME} $MAIN enableAdmin $@ elif [ $1 = -enableAdmin ] ; then -$JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN enableAdmin $@ +$JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -Dtomcat.home=${TOMCAT_HOME} $MAIN enableAdmin $@ else echo Using classpath: ${CLASSPATH} echo Using JAVA_HOME: ${JAVA_HOME} echo Using TOMCAT_HOME: ${TOMCAT_HOME} -$JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN start $@ +$JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -Dtomcat.home=${TOMCAT_HOME} $MAIN start $@ fi elif [ $1 = enableAdmin ] ; then - $JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN enableAdmin $@ + $JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -Dtomcat.home=${TOMCAT_HOME} $MAIN enableAdmin $@ elif [ $1 = estart ] ; then - $JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN estart $@ + $JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -Dtomcat.home=${TOMCAT_HOME} $MAIN estart $@ elif [ $1 = jspc ] ; then shift -$JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN jspc $@ +$JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -Dtomcat.home=${TOMCAT_HOME} $MAIN jspc $@ elif [ $1 = jspcOrig ] ; then shift @@ -297,7 +300,7 @@ if [ $oldCP != ]; then CLASSPATH=${CLASSPATH}:${oldCP} fi -(cd $TOMCAT_HOME; $JAVACMD $JSPC_OPTS -Dtomcat.home=${TOMCAT_HOME} org.apache.jasper.JspC $@ ) +(cd $TOMCAT_HOME; $JAVACMD $JSPC_OPTS -Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS -Dtomcat.home=${TOMCAT_HOME} org.apache.jasper.JspC $@ ) elif [ $1 = env ] ; then ## Call it with source tomcat to set the env for tomcat 1.49 +12 -9 jakarta-tomcat/src/shell/tomcat.bat Index: tomcat.bat === RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.bat,v retrieving revision 1.48 retrieving revision 1.49 diff -u -r1.48 -r1.49 --- tomcat.bat27 Sep 2002 01:47:23 - 1.48 +++ tomcat.bat13 Oct 2003 09:45:41 - 1.49 @@ -68,6 +68,9 @@ goto cleanup :okTcHome +rem Set the default -Djava.endorsed.dirs argument +set JAVA_ENDORSED_DIRS=%TOMCAT_HOME%\lib\endorsed + if not %TOMCAT_INSTALL% == goto gotTcInstall set TOMCAT_INSTALL=. if exist
cvs commit: jakarta-tomcat/src/shell tomcat.sh
hgomez 2003/03/06 08:29:31 Modified:src/shell tomcat.sh Log: Add some usefull ENV VARS as does in TC 4.1/TC 5.0 Revision ChangesPath 1.36 +76 -10jakarta-tomcat/src/shell/tomcat.sh Index: tomcat.sh === RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.sh,v retrieving revision 1.35 retrieving revision 1.36 diff -u -r1.35 -r1.36 --- tomcat.sh 27 Sep 2002 01:47:22 - 1.35 +++ tomcat.sh 6 Mar 2003 16:29:31 - 1.36 @@ -2,6 +2,28 @@ # # $Id$ +# Environment Variable Prequisites +# +# TOMCAT_HOME May point at your Tomcat directory. +# +# TOMCAT_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. +# +# 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. +# +# TOMCAT_PID (Optional) Path of the file which should contains the pid +# of catalina startup java process, when start (fork) is used +# + # Shell script to start and stop the server # There are other, simpler commands to startup the runner. The two @@ -12,6 +34,18 @@ #java -cp lib/tomcat.jar org.apache.tomcat.startup.Main $* #java -jar lib/tomcat.jar +# OS specific support. $var _must_ be set to either true or false. +cygwin=false +case `uname` in +CYGWIN*) cygwin=true;; +esac + +# 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 $TOMCAT_HOME ] TOMCAT_HOME=`cygpath --unix $CATALINA_HOME` + [ -n $CLASSPATH ] CLASSPATH=`cygpath --path --unix $CLASSPATH` +fi # Read local properties if [ -f $HOME/.tomcatrc ] ; then @@ -124,10 +158,32 @@ # This is consistent with java -jar tomcat.jar export CLASSPATH +## --- JPDA SUPPORT -- +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 + TOMCAT_OPTS=$TOMCAT_OPTS $JPDA_OPTS + shift +fi + ## Process options # add tomcat.policy - even if we don't use sandbox, it doesn't hurt TOMCAT_OPTS=$TOMCAT_OPTS -Djava.security.policy==${TOMCAT_HOME}/conf/tomcat.policy +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + JAVA_HOME=`cygpath --path --windows $JAVA_HOME` + TOMCAT_HOME=`cygpath --path --windows $CATALINA_HOME` + CLASSPATH=`cygpath --path --windows $CLASSPATH` +fi + # We start the server up in the background for a couple of reasons: # 1) It frees up your command window @@ -153,12 +209,21 @@ if [ $1 = -noout ] ; then shift -$JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN start $@ ${TOMCAT_HOME}/logs/stdout.log 21 +$JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN start $@ ${TOMCAT_HOME}/logs/stdout.log 21 + +if [ ! -z $TOMCAT_PID ]; then + echo $! $TOMCAT_PID +fi + else echo Using classpath: ${CLASSPATH} echo Using JAVA_HOME: ${JAVA_HOME} echo Using TOMCAT_HOME: ${TOMCAT_HOME} -$JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN start $@ +$JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN start $@ + +if [ ! -z $TOMCAT_PID ]; then + echo $! $TOMCAT_PID +fi fi @@ -183,7 +248,7 @@ echo Using classpath: ${CLASSPATH} echo Using JAVA_HOME: ${JAVA_HOME} echo Using TOMCAT_HOME: ${TOMCAT_HOME} - $JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN stop $@ + $JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN stop $@ if [ $1 = -force ] ; then shift @@ -195,26 +260,26 @@ shift # Backward compat if [ $1 = enableAdmin ] ; then -$JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN enableAdmin $@ +$JAVACMD $JAVA_OPTS $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN enableAdmin $@ elif [ $1 = -enableAdmin ] ; then -$JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN enableAdmin $@ +$JAVACMD $JAVA_OPTS
cvs commit: jakarta-tomcat/src/shell tomcat.sh
hgomez 2003/03/06 08:30:45 Modified:src/shell tomcat.sh Log: Was a little too fast, quick fixes. Revision ChangesPath 1.37 +4 -4 jakarta-tomcat/src/shell/tomcat.sh Index: tomcat.sh === RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.sh,v retrieving revision 1.36 retrieving revision 1.37 diff -u -r1.36 -r1.37 --- tomcat.sh 6 Mar 2003 16:29:31 - 1.36 +++ tomcat.sh 6 Mar 2003 16:30:45 - 1.37 @@ -21,7 +21,7 @@ # command is executed. The default is 8000. # # TOMCAT_PID (Optional) Path of the file which should contains the pid -# of catalina startup java process, when start (fork) is used +# of tomcat startup java process, when start (fork) is used # # Shell script to start and stop the server @@ -43,7 +43,7 @@ # 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 $TOMCAT_HOME ] TOMCAT_HOME=`cygpath --unix $CATALINA_HOME` + [ -n $TOMCAT_HOME ] TOMCAT_HOME=`cygpath --unix $TOMCAT_HOME` [ -n $CLASSPATH ] CLASSPATH=`cygpath --path --unix $CLASSPATH` fi @@ -180,7 +180,7 @@ # For Cygwin, switch paths to Windows format before running java if $cygwin; then JAVA_HOME=`cygpath --path --windows $JAVA_HOME` - TOMCAT_HOME=`cygpath --path --windows $CATALINA_HOME` + TOMCAT_HOME=`cygpath --path --windows $TOMCAT_HOME` CLASSPATH=`cygpath --path --windows $CLASSPATH` fi - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat/src/shell tomcat.sh tomcat.bat
larryi 2002/09/26 18:47:23 Modified:src/shell tomcat.sh tomcat.bat Log: Update to use the original name of the commons-logging jar we are including. Revision ChangesPath 1.35 +2 -2 jakarta-tomcat/src/shell/tomcat.sh Index: tomcat.sh === RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.sh,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- tomcat.sh 19 Sep 2002 04:21:17 - 1.34 +++ tomcat.sh 27 Sep 2002 01:47:22 - 1.35 @@ -117,7 +117,7 @@ oldCP=$CLASSPATH unset CLASSPATH -CLASSPATH=${TOMCAT_INSTALL}/lib/tomcat.jar:${TOMCAT_INSTALL}/lib/common/commons-logging.jar +CLASSPATH=${TOMCAT_INSTALL}/lib/tomcat.jar:${TOMCAT_INSTALL}/lib/common/commons-logging-api.jar # Ignore previous CLASSPATH 1.48 +2 -2 jakarta-tomcat/src/shell/tomcat.bat Index: tomcat.bat === RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.bat,v retrieving revision 1.47 retrieving revision 1.48 diff -u -r1.47 -r1.48 --- tomcat.bat19 Sep 2002 04:21:17 - 1.47 +++ tomcat.bat27 Sep 2002 01:47:23 - 1.48 @@ -97,7 +97,7 @@ :setClasspath -set CLASSPATH=%TOMCAT_INSTALL%\lib\tomcat.jar;%TOMCAT_INSTALL%\lib\common\commons-logging.jar +set CLASSPATH=%TOMCAT_INSTALL%\lib\tomcat.jar;%TOMCAT_INSTALL%\lib\common\commons-logging-api.jar rem - Execute The Requested Command - -- To unsubscribe, e-mail: mailto:[EMAIL PROTECTED] For additional commands, e-mail: mailto:[EMAIL PROTECTED]
cvs commit: jakarta-tomcat/src/shell tomcat.sh
larryi 01/10/21 10:33:41 Modified:src/shell tomcat.sh Log: Update to usage info and a little formatting. Submitted by: Jeff Turner Revision ChangesPath 1.31 +35 -24jakarta-tomcat/src/shell/tomcat.sh Index: tomcat.sh === RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.sh,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- tomcat.sh 2001/09/20 03:35:41 1.30 +++ tomcat.sh 2001/10/21 17:33:41 1.31 @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: tomcat.sh,v 1.30 2001/09/20 03:35:41 larryi Exp $ +# $Id: tomcat.sh,v 1.31 2001/10/21 17:33:41 larryi Exp $ # Shell script to start and stop the server @@ -32,9 +32,9 @@ ls=`ls -ld $PRG` link=`expr $ls : '.*- \(.*\)$'` if expr $link : '.*/.*' /dev/null; then - PRG=$link +PRG=$link else - PRG=`dirname $PRG`/$link +PRG=`dirname $PRG`/$link fi done @@ -43,10 +43,10 @@ echo Guessing TOMCAT_INSTALL from tomcat.sh to ${TOMCAT_INSTALL_1} fi if [ -d ${TOMCAT_INSTALL_1}/lib ] ; then - TOMCAT_INSTALL=${TOMCAT_INSTALL_1} +TOMCAT_INSTALL=${TOMCAT_INSTALL_1} if [ $DEBUG_HOMEFIND != false ] ; then echo Setting TOMCAT_INSTALL to $TOMCAT_INSTALL - fi +fi fi fi @@ -85,11 +85,11 @@ if [ $TOMCAT_HOME = ] ; then if [ -d ./conf ] ; then - TOMCAT_HOME=. +TOMCAT_HOME=. elif [ -d ../conf ] ; then - TOMCAT_HOME=.. +TOMCAT_HOME=.. else - TOMCAT_HOME=$TOMCAT_INSTALL +TOMCAT_HOME=$TOMCAT_INSTALL fi fi @@ -147,11 +147,12 @@ rm -f ${TOMCAT_HOME}/conf/ajp12.id fi + MAX_WAIT=360 WAIT=0 if [ $1 = -wait ] ; then shift # wait at least 6 min -WAIT=360 +WAIT=${MAX_WAIT} fi if [ $1 = -noout ] ; then @@ -175,8 +176,8 @@ WAIT=`expr $WAIT - 1` if [ $WAIT = 0 ] ; then -echo Tomcat was no ready after 120 seconds, giving up waiting - break; +echo Tomcat was not ready after ${MAX_WAIT} seconds, giving up waiting +break; fi done fi @@ -223,17 +224,17 @@ shift CLASSPATH=. for i in ${TOMCAT_HOME}/lib/container/* ${TOMCAT_HOME}/lib/common/* ; do - CLASSPATH=${CLASSPATH}:$i +CLASSPATH=${CLASSPATH}:$i done CLASSPATH=${CLASSPATH}:${JAVA_HOME}/lib/tools.jar # Backdoor classpath setting for development purposes when all classes - # are compiled into a /classes dir and are not yet jarred. +# are compiled into a /classes dir and are not yet jarred. if [ -d ${TOMCAT_HOME}/classes ]; then - CLASSPATH=${TOMCAT_HOME}/classes:${CLASSPATH} +CLASSPATH=${TOMCAT_HOME}/classes:${CLASSPATH} fi if [ $oldCP != ]; then - CLASSPATH=${CLASSPATH}:${oldCP} +CLASSPATH=${CLASSPATH}:${oldCP} fi (cd $TOMCAT_HOME; $JAVACMD $JSPC_OPTS -Dtomcat.home=${TOMCAT_HOME} org.apache.jasper.JspC $@ ) @@ -266,15 +267,25 @@ else echo Usage: - echo tomcat (start|env|run|stop|jspc) - echo start - start tomcat in the background - echo run - start tomcat in the foreground - echo run -wait - wait until tomcat is initialized before returning - echo -security - use a SecurityManager when starting - echo stop - stop tomcat - echo env - set CLASSPATH and TOMCAT_HOME env. variables - echo jspc - run jsp pre compiler - + echo $0 (start|run|stop|enableAdmin|estart|env|jspc) + echo start- start tomcat in the background + echo start -security - use a SecurityManager when starting + echo start -noout - redirect stdout/stderr to \$TOMCAT_HOME/logs/stdout.log + echo start -wait - wait until tomcat is initialized before returning + echo start -help - more options + echo (config, debug, estart, home, install, jkconf, sandbox) + echo run - start tomcat in the foreground + echo run -security- use a SecurityManager when starting + echo stop - stop tomcat + echo stop -force - stop tomcat with the 'kill' command if necessary + echo stop -help - more options + echo (ajpid, host, home, pass, port) + echo enableAdmin - Trust the admin web application, + echo i.e. rewrites conf/apps-admin.xml with trusted=\true\ + echo estart - Start Tomcat using the/your EmbededTomcat class which + echo uses a hardcoded set of modules + echo env
cvs commit: jakarta-tomcat/src/shell tomcat.sh
larryi 01/09/19 20:35:41 Modified:src/shell tomcat.sh Log: Remove rt.jar from $CLASSPATH. Updates to JspInterceptor make it unnecessary. Revision ChangesPath 1.30 +1 -5 jakarta-tomcat/src/shell/tomcat.sh Index: tomcat.sh === RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.sh,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- tomcat.sh 2001/09/17 04:59:32 1.29 +++ tomcat.sh 2001/09/20 03:35:41 1.30 @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: tomcat.sh,v 1.29 2001/09/17 04:59:32 costin Exp $ +# $Id: tomcat.sh,v 1.30 2001/09/20 03:35:41 larryi Exp $ # Shell script to start and stop the server @@ -120,10 +120,6 @@ CLASSPATH=${TOMCAT_INSTALL}/lib/tomcat.jar # Ignore previous CLASSPATH - -if [ -f ${JAVA_HOME}/jre/lib/rt.jar ] ; then -CLASSPATH=${CLASSPATH}:${JAVA_HOME}/jre/lib/rt.jar -fi # This is consistent with java -jar tomcat.jar export CLASSPATH
cvs commit: jakarta-tomcat/src/shell tomcat.sh
costin 01/09/13 21:11:20 Modified:src/shell tomcat.sh Log: Make tomcat.sh consitent with tomcat.bat, and better use of the TOMCAT_INSTALL/TOMCAT_HOME. TOMCAT_INSTALL is the directory where tomcat is installed, where bin/ and lib/ are located. TOMCAT_HOME is the local instance, where conf/, webapps/, work/ and log/ are located. Larry did the cleanup on the .bat file, this is just cutpaste ( the shell script looks a bit more complex because we're also following symlinks in case tomcat.sh or a link to it is in path - so the lazy user doesn't have to set the env ) ( well, I'm a lazy user as I never set TOMCAT_HOME, too many instances on my machine :-) Revision ChangesPath 1.28 +26 -18jakarta-tomcat/src/shell/tomcat.sh Index: tomcat.sh === RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.sh,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- tomcat.sh 2001/08/22 04:55:33 1.27 +++ tomcat.sh 2001/09/14 04:11:20 1.28 @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: tomcat.sh,v 1.27 2001/08/22 04:55:33 costin Exp $ +# $Id: tomcat.sh,v 1.28 2001/09/14 04:11:20 costin Exp $ # Shell script to start and stop the server @@ -23,7 +23,7 @@ # Follow symbolic links to the real tomcat.sh # Extract the base dir. # Look in well-known places if this fails -if [ $TOMCAT_HOME = ] ; then +if [ $TOMCAT_INSTALL = ] ; then ## resolve links - $0 may be a link to home PRG=$0 progname=`basename $0` @@ -38,40 +38,40 @@ fi done - TOMCAT_HOME_1=`dirname $PRG`/.. + TOMCAT_INSTALL_1=`dirname $PRG`/.. if [ $DEBUG_HOMEFIND != false ] ; then -echo Guessing TOMCAT_HOME from tomcat.sh to ${TOMCAT_HOME_1} +echo Guessing TOMCAT_INSTALL from tomcat.sh to ${TOMCAT_INSTALL_1} fi -if [ -d ${TOMCAT_HOME_1}/conf ] ; then - TOMCAT_HOME=${TOMCAT_HOME_1} +if [ -d ${TOMCAT_INSTALL_1}/lib ] ; then + TOMCAT_INSTALL=${TOMCAT_INSTALL_1} if [ $DEBUG_HOMEFIND != false ] ; then - echo Setting TOMCAT_HOME to $TOMCAT_HOME + echo Setting TOMCAT_INSTALL to $TOMCAT_INSTALL fi fi fi -if [ $TOMCAT_HOME = ] ; then +if [ $TOMCAT_INSTALL = ] ; then # try to find tomcat if [ -d ${HOME}/opt/tomcat/conf ] ; then -TOMCAT_HOME=${HOME}/opt/tomcat +TOMCAT_INSTALL=${HOME}/opt/tomcat if [ $DEBUG_HOMEFIND != false ] ; then - echo Defaulting TOMCAT_HOME to $TOMCAT_HOME + echo Defaulting TOMCAT_INSTALL to $TOMCAT_INSTALL fi fi if [ -d /opt/tomcat/conf ] ; then -TOMCAT_HOME=/opt/tomcat +TOMCAT_INSTALL=/opt/tomcat if [ $DEBUG_HOMEFIND != false ] ; then - echo Defaulting TOMCAT_HOME to $TOMCAT_HOME + echo Defaulting TOMCAT_INSTALL to $TOMCAT_INSTALL fi fi # Add other standard locations for tomcat fi -if [ $TOMCAT_HOME = ] ; then -echo TOMCAT_HOME not set, you need to set it or install in a standard location +if [ $TOMCAT_INSTALL = ] ; then +echo TOMCAT_INSTALL not set, you need to set it or install in a standard location exit 1 fi @@ -83,8 +83,19 @@ JSPC_OPTS= fi +if [ $TOMCAT_HOME = ] ; then +if [ -d ./conf ] ; then + TOMCAT_HOME=. +elif [ -d ../conf ] ; then + TOMCAT_HOME=.. +else + TOMCAT_HOME=$TOMCAT_INSTALL +fi +fi + ## Find JAVA_HOME + if [ -z $JAVA_HOME ] ; then JAVA=`which java` if [ -z $JAVA ] ; then @@ -106,12 +117,9 @@ oldCP=$CLASSPATH unset CLASSPATH -CLASSPATH=${TOMCAT_HOME}/lib/tomcat.jar +CLASSPATH=${TOMCAT_INSTALL}/lib/tomcat.jar # Ignore previous CLASSPATH -#if [ $oldCP != ]; then -#CLASSPATH=${CLASSPATH}:${oldCP} -#fi if [ -f ${JAVA_HOME}/jre/lib/rt.jar ] ; then CLASSPATH=${CLASSPATH}:${JAVA_HOME}/jre/lib/rt.jar
Env variables (Re: cvs commit: jakarta-tomcat/src/shell tomcat.sh)
On Fri, Sep 14, 2001 at 04:11:20AM -, [EMAIL PROTECTED] wrote: ( well, I'm a lazy user as I never set TOMCAT_HOME, too many instances on my machine :-) I think that's useful advice generally. If the startup script of your app can automagically figure out the *_HOME directory, let it. A wrongly set TOMCAT_HOME left over from a previous installation (or ANT_HOME, etc) can cause lots of confusion. --Jeff
RE: cvs commit: jakarta-tomcat/src/shell tomcat.sh
I will try to add rt.jar in the bootstrap class ( Main ).. as tools.jar is now correctly used... I continue thinking that the startup classpath needs to be clean for startup... Saludos , Ignacio J. Ortega -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Enviado el: jueves 5 de julio de 2001 11:05 Para: [EMAIL PROTECTED] Asunto: cvs commit: jakarta-tomcat/src/shell tomcat.sh hgomez 01/07/05 02:05:29 Modified:src/shell tomcat.sh Log: needed rt.jar to have tomcat compiling jsp Revision ChangesPath 1.25 +5 -1 jakarta-tomcat/src/shell/tomcat.sh Index: tomcat.sh === RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.sh,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- tomcat.sh 2001/05/26 19:20:28 1.24 +++ tomcat.sh 2001/07/05 09:05:27 1.25 @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: tomcat.sh,v 1.24 2001/05/26 19:20:28 costin Exp $ +# $Id: tomcat.sh,v 1.25 2001/07/05 09:05:27 hgomez Exp $ # Shell script to start and stop the server @@ -114,6 +114,10 @@ if [ $oldCP != ]; then CLASSPATH=${CLASSPATH}:${oldCP} +fi + +if [ -f ${JAVA_HOME}/jre/lib/rt.jar ] ; then +CLASSPATH=${CLASSPATH}:${JAVA_HOME}/jre/lib/rt.jar fi export CLASSPATH
RE: cvs commit: jakarta-tomcat/src/shell tomcat.sh
Hi, Is this just for the Jikes compilation problems? If so, I would rather see JikesJavaCompiler.java updated to build the necessary classpath setting rather that modify the Tomcat's classpath's. That way you can handle the lib/ext directory as well. Actually, fixing JikesJavaCompiler.java is already on my todo list, if I dig deep enough. :( If this isn't for Jikes, what problem is being solved by this? Larry -Original Message- From: Ignacio J. Ortega [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 05, 2001 1:02 PM To: '[EMAIL PROTECTED]' Subject: RE: cvs commit: jakarta-tomcat/src/shell tomcat.sh I will try to add rt.jar in the bootstrap class ( Main ).. as tools.jar is now correctly used... I continue thinking that the startup classpath needs to be clean for startup... Saludos , Ignacio J. Ortega -Mensaje original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Enviado el: jueves 5 de julio de 2001 11:05 Para: [EMAIL PROTECTED] Asunto: cvs commit: jakarta-tomcat/src/shell tomcat.sh hgomez 01/07/05 02:05:29 Modified:src/shell tomcat.sh Log: needed rt.jar to have tomcat compiling jsp Revision ChangesPath 1.25 +5 -1 jakarta-tomcat/src/shell/tomcat.sh Index: tomcat.sh === RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.sh,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- tomcat.sh 2001/05/26 19:20:28 1.24 +++ tomcat.sh 2001/07/05 09:05:27 1.25 @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: tomcat.sh,v 1.24 2001/05/26 19:20:28 costin Exp $ +# $Id: tomcat.sh,v 1.25 2001/07/05 09:05:27 hgomez Exp $ # Shell script to start and stop the server @@ -114,6 +114,10 @@ if [ $oldCP != ]; then CLASSPATH=${CLASSPATH}:${oldCP} +fi + +if [ -f ${JAVA_HOME}/jre/lib/rt.jar ] ; then +CLASSPATH=${CLASSPATH}:${JAVA_HOME}/jre/lib/rt.jar fi export CLASSPATH
cvs commit: jakarta-tomcat/src/shell tomcat.sh
costin 01/05/26 12:20:29 Modified:src/shell tomcat.sh Log: Increase the delay for slower hard disks. Revision ChangesPath 1.24 +3 -3 jakarta-tomcat/src/shell/tomcat.sh Index: tomcat.sh === RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.sh,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- tomcat.sh 2001/04/22 15:52:11 1.23 +++ tomcat.sh 2001/05/26 19:20:28 1.24 @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: tomcat.sh,v 1.23 2001/04/22 15:52:11 costin Exp $ +# $Id: tomcat.sh,v 1.24 2001/05/26 19:20:28 costin Exp $ # Shell script to start and stop the server @@ -144,8 +144,8 @@ WAIT=0 if [ $1 = -wait ] ; then shift -# wait at least 2 min -WAIT=120 +# wait at least 6 min +WAIT=360 fi if [ $1 = -noout ] ; then
cvs commit: jakarta-tomcat/src/shell tomcat.sh
costin 01/04/22 08:52:12 Modified:src/shell tomcat.sh Log: Fix for #232, thanks [EMAIL PROTECTED] (Mark Norman) for the report and fix. Submitted by: [EMAIL PROTECTED] (Mark Norman) Revision ChangesPath 1.23 +10 -2 jakarta-tomcat/src/shell/tomcat.sh Index: tomcat.sh === RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.sh,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- tomcat.sh 2001/03/21 06:41:36 1.22 +++ tomcat.sh 2001/04/22 15:52:11 1.23 @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: tomcat.sh,v 1.22 2001/03/21 06:41:36 costin Exp $ +# $Id: tomcat.sh,v 1.23 2001/04/22 15:52:11 costin Exp $ # Shell script to start and stop the server @@ -123,7 +123,15 @@ # We start the server up in the background for a couple of reasons: # 1) It frees up your command window # 2) You should use `stop` option instead of ^C to bring down the server -if [ "$1" = "start" ] ; then +if [ "$1" = "start_msg" ]; then + shift + echo "Starting Tomcat Servlet Engine" + +elif [ "$1" = "stop_msg" ]; then + shift + echo "Stopping Tomcat Servlet Engine" + +elif [ "$1" = "start" ] ; then shift #Old code for -security: -Djava.security.manager -Djava.security.policy==${TOMCAT_HOME}/conf/tomcat.policy
cvs commit: jakarta-tomcat/src/shell tomcat.sh
costin 01/03/20 22:41:37 Modified:src/shell tomcat.sh Log: Few more changes to the .sh script: - less verbosity ( no message on the console if the output will be redirected, let java do the output for home, classpath ) - fixed the startup with wait - added a "force" stop ( i.e. kill the process ) - use log for pid and console output ( as sugested ) Revision ChangesPath 1.22 +25 -11jakarta-tomcat/src/shell/tomcat.sh Index: tomcat.sh === RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.sh,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- tomcat.sh 2001/03/15 07:33:19 1.21 +++ tomcat.sh 2001/03/21 06:41:36 1.22 @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: tomcat.sh,v 1.21 2001/03/15 07:33:19 costin Exp $ +# $Id: tomcat.sh,v 1.22 2001/03/21 06:41:36 costin Exp $ # Shell script to start and stop the server @@ -19,6 +19,7 @@ fi # Guess TOMCAT_HOME +DEBUG_HOMEFIND=false # Follow symbolic links to the real tomcat.sh # Extract the base dir. # Look in well-known places if this fails @@ -38,10 +39,14 @@ done TOMCAT_HOME_1=`dirname "$PRG"`/.. - echo "Guessing TOMCAT_HOME from tomcat.sh to ${TOMCAT_HOME_1}" + if [ "$DEBUG_HOMEFIND" != "false" ] ; then +echo "Guessing TOMCAT_HOME from tomcat.sh to ${TOMCAT_HOME_1}" + fi if [ -d ${TOMCAT_HOME_1}/conf ] ; then TOMCAT_HOME=${TOMCAT_HOME_1} - echo "Setting TOMCAT_HOME to $TOMCAT_HOME" +if [ "$DEBUG_HOMEFIND" != "false" ] ; then + echo "Setting TOMCAT_HOME to $TOMCAT_HOME" + fi fi fi @@ -50,12 +55,16 @@ # try to find tomcat if [ -d ${HOME}/opt/tomcat/conf ] ; then TOMCAT_HOME=${HOME}/opt/tomcat -echo "Defaulting TOMCAT_HOME to $TOMCAT_HOME" +if [ "$DEBUG_HOMEFIND" != "false" ] ; then + echo "Defaulting TOMCAT_HOME to $TOMCAT_HOME" +fi fi if [ -d /opt/tomcat/conf ] ; then TOMCAT_HOME=/opt/tomcat -echo "Defaulting TOMCAT_HOME to $TOMCAT_HOME" +if [ "$DEBUG_HOMEFIND" != "false" ] ; then + echo "Defaulting TOMCAT_HOME to $TOMCAT_HOME" +fi fi # Add other "standard" locations for tomcat @@ -116,9 +125,6 @@ # 2) You should use `stop` option instead of ^C to bring down the server if [ "$1" = "start" ] ; then shift - echo Using classpath: ${CLASSPATH} - echo Using JAVA_HOME: ${JAVA_HOME} - echo Using TOMCAT_HOME: ${TOMCAT_HOME} #Old code for -security: -Djava.security.manager -Djava.security.policy==${TOMCAT_HOME}/conf/tomcat.policy # not needed, java starter will do that automatically @@ -136,14 +142,17 @@ if [ "$1" = "-noout" ] ; then shift -$JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN "$@" ${TOMCAT_HOME}/stdout.log 21 +$JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN "$@" ${TOMCAT_HOME}/logs/stdout.log 21 else +echo Using classpath: ${CLASSPATH} +echo Using JAVA_HOME: ${JAVA_HOME} +echo Using TOMCAT_HOME: ${TOMCAT_HOME} $JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN "$@" fi JAVA_PID=$! - echo $JAVA_PID ${TOMCAT_HOME}/conf/tomcat.pid + echo $JAVA_PID ${TOMCAT_HOME}/logs/tomcat.pid # Wait for ajp12.id signaling end of startup if [ ! "$WAIT" = "0" ] ; then @@ -151,7 +160,7 @@ sleep 1 WAIT=`expr $WAIT - 1` -if [ "$i" = "0" ] ; then +if [ "$WAIT" = "0" ] ; then echo "Tomcat was no ready after 120 seconds, giving up waiting " break; fi @@ -165,6 +174,11 @@ echo Using TOMCAT_HOME: ${TOMCAT_HOME} CLASSPATH=${CLASSPATH}:${TOMCAT_HOME}/lib/stop-tomcat.jar $JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.StopTomcat "$@" + + if [ "$1" = "-force" ] ; then +shift +kill -9 `cat $TOMCAT_HOME/logs/tomcat.pid` + fi elif [ "$1" = "run" ] ; then shift
Re: cvs commit: jakarta-tomcat/src/shell tomcat.sh
+1 On putting it in the logs directory. Mel --- David Rees [EMAIL PROTECTED] wrote: On Thu, Mar 15, 2001 at 07:33:19AM -, [EMAIL PROTECTED] wrote: costin 01/03/14 23:33:19 - added -noout option to redirect the stdout/stderr to a file Great, I've been modifying my tomcat scripts to do this by hand forever. - save the PID of the java process in conf/tomcat.pid ( of course, you don't need this because tomcat never hangs, but just in case :-) Shouldn't the pid file be saved in the logs directory as it seems to be customary to do so? (Apache puts it's .pid file in the log dir) -Dave __ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/
cvs commit: jakarta-tomcat/src/shell tomcat.sh
costin 01/03/14 23:33:19 Modified:.changes3.3 src/share/org/apache/tomcat/modules/config ProfileLoader.java src/share/org/apache/tomcat/modules/server Ajp12Interceptor.java src/share/org/apache/tomcat/startup Tomcat.java src/shell tomcat.sh Log: Few more usability changes ( in the main branch ) - generate the ajp12.id file when the server is moving to "READY" state, i.e. after all initialization ( including starting the connectors ) - added -wait option to tomcat.sh, so that the script returns when the server is ready ( it just looks for ajp12.id file ) - added -noout option to redirect the stdout/stderr to a file - save the PID of the java process in conf/tomcat.pid ( of course, you don't need this because tomcat never hangs, but just in case :-) - also, the -security option is no longer processed in the shell script, it is part of the java start code ( and all config is now in server.xml, including the policy file - no need to edit the shell script ) The first 2 changes will make it easier to write test scripts ( tomcat.sh will return when it's ready and you can start sending request ). None of them should affect existing use - but may simplify some tasks Please review - I don't know if this is needed in the BAT files ( you don't have a kill command, etc ) Revision ChangesPath 1.9 +19 -0 jakarta-tomcat/changes3.3 Index: changes3.3 === RCS file: /home/cvs/jakarta-tomcat/changes3.3,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- changes3.32001/03/13 23:43:47 1.8 +++ changes3.32001/03/15 07:33:17 1.9 @@ -113,6 +113,24 @@ BUILD/STARTUP +- On startup, after the server is initialized, the Ajp12Interceptor will + generate conf/ajp12.id containing it's port and secret ( if any ), to +allow easy stop. + +- the unix start scripts now take a "-wait" option ( "tomcat.sh start -wait" ) +making the script wait until the server is started. This is good for +automated tests. + +- the unix scripts will generate a conf/tomcat.pid file with the pid +of the java process that is put in background. This should be used as +a last resort if normal shutdown fails. + +- the -security option is passed and processed in Java. All sandboxing +options are specified using PolicyInterceptor ( including the +policy file, etc ) - the command line is no longer used. This allows +people embeding tomcat the same control and reduces the complexity of +the shell script. + - org.apache.tomcat.startup.Main now builds 3 distinct class loaders: (1) one to be used only by the servlet container. (2) one to be shared by all web applications and (3) one that is common to both the above. @@ -123,6 +141,7 @@ to the 'apps' and 'common' classloaders by including them in the classpath properties "-Dorg.apache.tomcat.apps.classpath" and "-Dorg.apache.tomcat.common.classpath", respectively. + - generate separate jar files for each component ( utils, core, facade, modules ) That insures the layers are properly separated, utils can be reused. 1.4 +1 -1 jakarta-tomcat/src/share/org/apache/tomcat/modules/config/ProfileLoader.java Index: ProfileLoader.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/ProfileLoader.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- ProfileLoader.java2001/03/08 18:42:43 1.3 +++ ProfileLoader.java2001/03/15 07:33:18 1.4 @@ -363,7 +363,7 @@ ClassLoader appLoader; Vector modules=new Vector(); -public Profile() {}; +public Profile() {} public String getName() { return name; 1.13 +6 -2 jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp12Interceptor.java Index: Ajp12Interceptor.java === RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/server/Ajp12Interceptor.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Ajp12Interceptor.java 2001/02/07 07:01:25 1.12 +++ Ajp12Interceptor.java 2001/03/15 07:33:18 1.13 @@ -101,10 +101,14 @@ secret=s; } -public void engineInit(ContextManager cm ) +public void engineState(ContextManager cm, int state ) throws TomcatException { - super.engineInit(cm); + if( state!=ContextManager.STATE_START ) + return; + // the engine is now started,
Re: cvs commit: jakarta-tomcat/src/shell tomcat.sh
On Thu, Mar 15, 2001 at 07:33:19AM -, [EMAIL PROTECTED] wrote: costin 01/03/14 23:33:19 - added -noout option to redirect the stdout/stderr to a file Great, I've been modifying my tomcat scripts to do this by hand forever. - save the PID of the java process in conf/tomcat.pid ( of course, you don't need this because tomcat never hangs, but just in case :-) Shouldn't the pid file be saved in the logs directory as it seems to be customary to do so? (Apache puts it's .pid file in the log dir) -Dave
cvs commit: jakarta-tomcat/src/shell tomcat.sh
costin 01/02/05 20:44:53 Modified:src/shell tomcat.sh Log: Shell changes to match Nacho's bat file. The new behavior is enabled by default, comment out the first line if you want to go back. ( after a transition period I'll remove the old code from the startup script - it'll be much simpler and cleaner ) Revision ChangesPath 1.20 +22 -7 jakarta-tomcat/src/shell/tomcat.sh Index: tomcat.sh === RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.sh,v retrieving revision 1.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- tomcat.sh 2000/08/15 14:25:06 1.19 +++ tomcat.sh 2001/02/06 04:44:53 1.20 @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: tomcat.sh,v 1.19 2000/08/15 14:25:06 glenn Exp $ +# $Id: tomcat.sh,v 1.20 2001/02/06 04:44:53 costin Exp $ # Shell script to start and stop the server @@ -12,6 +12,9 @@ #jre -cp runner.jar:servlet.jar:classes org.apache.tomcat.shell.Startup $* #java -cp runner.jar:servlet.jar:classes org.apache.tomcat.shell.Startup $* +NEW_LOADER=1 +export NEW_LOADER + if [ -f $HOME/.tomcatrc ] ; then . $HOME/.tomcatrc fi @@ -91,6 +94,15 @@ oldCP=$CLASSPATH unset CLASSPATH + +if [ "$NEW_LOADER" = "1" ]; then + MAIN=org.apache.tomcat.startup.Main + export MAIN + CLASSPATH=${TOMCAT_HOME}/lib/tomcat.jar +else + MAIN=org.apache.tomcat.startup.Tomcat + +## Temp - old script for i in ${TOMCAT_HOME}/lib/* ; do if [ "$CLASSPATH" != "" ]; then CLASSPATH=${CLASSPATH}:$i @@ -114,6 +126,9 @@ CLASSPATH=${CLASSPATH}:${oldCP} fi +# End - NEW_LOADER +fi + export CLASSPATH # We start the server up in the background for a couple of reasons: @@ -126,9 +141,9 @@ echo Using TOMCAT_HOME: ${TOMCAT_HOME} if [ "$1" = "-security" ] ; then echo Starting with a SecurityManager -$JAVACMD $TOMCAT_OPTS -Djava.security.manager -Djava.security.policy==${TOMCAT_HOME}/conf/tomcat.policy -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat "$@" +$JAVACMD $TOMCAT_OPTS -Djava.security.manager -Djava.security.policy==${TOMCAT_HOME}/conf/tomcat.policy -Dtomcat.home=${TOMCAT_HOME} $MAIN "$@" else - $JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat "$@" + $JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN "$@" fi # $JAVACMD org.apache.tomcat.shell.Startup "$@" @@ -137,8 +152,8 @@ echo Using classpath: ${CLASSPATH} echo Using JAVA_HOME: ${JAVA_HOME} echo Using TOMCAT_HOME: ${TOMCAT_HOME} - $JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat -stop "$@" -# $JAVACMD org.apache.tomcat.shell.Shutdown "$@" + CLASSPATH=${CLASSPATH}:${TOMCAT_HOME}/lib/stop-tomcat.jar + $JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.StopTomcat "$@" elif [ "$1" = "run" ] ; then shift @@ -147,9 +162,9 @@ echo Using TOMCAT_HOME: ${TOMCAT_HOME} if [ "$1" = "-security" ] ; then echo Starting with a SecurityManager -$JAVACMD $TOMCAT_OPTS -Djava.security.manager -Djava.security.policy==${TOMCAT_HOME}/conf/tomcat.policy -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat "$@" +$JAVACMD $TOMCAT_OPTS -Djava.security.manager -Djava.security.policy==${TOMCAT_HOME}/conf/tomcat.policy -Dtomcat.home=${TOMCAT_HOME} $MAIN "$@" else - $JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat "$@" + $JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} $MAIN "$@" fi # $JAVACMD org.apache.tomcat.shell.Startup "$@" # no - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat/src/shell tomcat.sh
glenn 01/01/10 14:55:49 Modified:src/shell Tag: tomcat_32 tomcat.sh Log: Fixed startup with -security Revision ChangesPath No revision No revision 1.17.2.2 +3 -1 jakarta-tomcat/src/shell/tomcat.sh Index: tomcat.sh === RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.sh,v retrieving revision 1.17.2.1 retrieving revision 1.17.2.2 diff -u -r1.17.2.1 -r1.17.2.2 --- tomcat.sh 2000/11/17 22:05:50 1.17.2.1 +++ tomcat.sh 2001/01/10 22:55:48 1.17.2.2 @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: tomcat.sh,v 1.17.2.1 2000/11/17 22:05:50 glenn Exp $ +# $Id: tomcat.sh,v 1.17.2.2 2001/01/10 22:55:48 glenn Exp $ # Shell script to start and stop the server @@ -122,6 +122,7 @@ shift echo Using classpath: ${CLASSPATH} if [ "$1" = "-security" ] ; then +shift echo Starting with a SecurityManager $JAVACMD $TOMCAT_OPTS -Djava.security.manager -Djava.security.policy==${TOMCAT_HOME}/conf/tomcat.policy -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat "$@" else @@ -139,6 +140,7 @@ shift echo Using classpath: ${CLASSPATH} if [ "$1" = "-security" ] ; then +shift echo Starting with a SecurityManager $JAVACMD $TOMCAT_OPTS -Djava.security.manager -Djava.security.policy==${TOMCAT_HOME}/conf/tomcat.policy -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat "$@" else - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat/src/shell tomcat.sh
glenn 00/11/17 14:05:50 Modified:src/shell Tag: tomcat_32 tomcat.sh Log: Remove current directory from CLASSPATH Revision ChangesPath No revision No revision 1.17.2.1 +7 -4 jakarta-tomcat/src/shell/tomcat.sh Index: tomcat.sh === RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.sh,v retrieving revision 1.17 retrieving revision 1.17.2.1 diff -u -r1.17 -r1.17.2.1 --- tomcat.sh 2000/05/26 18:55:33 1.17 +++ tomcat.sh 2000/11/17 22:05:50 1.17.2.1 @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: tomcat.sh,v 1.17 2000/05/26 18:55:33 costin Exp $ +# $Id: tomcat.sh,v 1.17.2.1 2000/11/17 22:05:50 glenn Exp $ # Shell script to start and stop the server @@ -87,12 +87,15 @@ JAVACMD=$JAVA_HOME/bin/java fi - oldCP=$CLASSPATH -CLASSPATH=. +unset CLASSPATH for i in ${TOMCAT_HOME}/lib/* ; do - CLASSPATH=${CLASSPATH}:$i + if [ "$CLASSPATH" != "" ]; then +CLASSPATH=${CLASSPATH}:$i + else +CLASSPATH=$i + fi done if [ -f ${JAVA_HOME}/lib/tools.jar ] ; then