patrickl 02/01/30 10:10:40 Modified: catalina/src/bin Tag: tomcat_40_branch catalina.bat catalina.sh cpappend.bat digest.bat digest.sh shutdown.bat shutdown.sh startup.bat startup.sh jasper/src/bin Tag: tomcat_40_branch jasper.bat jasper.sh jspc.bat jspc.sh Added: catalina/src/bin Tag: tomcat_40_branch setclasspath.bat setclasspath.sh tool-wrapper.bat tool-wrapper.sh Removed: jasper/src/bin Tag: tomcat_40_branch jpappend.bat Log: Integrate newer scripts from HEAD branch into this branch Revision Changes Path No revision No revision 1.18.2.4 +147 -101 jakarta-tomcat-4.0/catalina/src/bin/catalina.bat Index: catalina.bat =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/catalina.bat,v retrieving revision 1.18.2.3 retrieving revision 1.18.2.4 diff -u -r1.18.2.3 -r1.18.2.4 --- catalina.bat 12 Oct 2001 17:10:52 -0000 1.18.2.3 +++ catalina.bat 30 Jan 2002 18:10:39 -0000 1.18.2.4 @@ -1,137 +1,183 @@ @echo off +if "%OS%" == "Windows_NT" setlocal rem --------------------------------------------------------------------------- -rem catalina.bat - Start/Stop Script for the CATALINA Server +rem Start/Stop Script for the CATALINA Server rem -rem Environment Variable Prequisites: +rem Environment Variable Prequisites 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 CATALINA_HOME May point at your Catalina "build" directory. rem -rem CATALINA_HOME (Optional) May point at your Catalina "build" directory. -rem If not present, the current working directory is assumed. +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 CATALINA_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 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 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 JAVA_HOME Must point at your Java Development Kit installation. rem -rem $Id: catalina.bat,v 1.18.2.3 2001/10/12 17:10:52 craigmcc Exp $ +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_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.18.2.4 2002/01/30 18:10:39 patrickl Exp $ rem --------------------------------------------------------------------------- - -rem ----- Save Environment Variables That May Change -------------------------- - -set _CATALINA_BASE=%CATALINA_BASE% -set _CATALINA_HOME=%CATALINA_HOME% -set _CLASSPATH=%CLASSPATH% -set _CP=%CP% - - -rem ----- Verify and Set Required Environment Variables ----------------------- - -if not "%JAVA_HOME%" == "" goto gotJava -echo You must set JAVA_HOME to point at your Java Development Kit installation -goto cleanup -:gotJava - +rem Guess CATALINA_HOME if not defined if not "%CATALINA_HOME%" == "" goto gotHome set CATALINA_HOME=. if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome set CATALINA_HOME=.. :gotHome if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome -echo Cannot find catalina.bat in %CATALINA_HOME%\bin -echo Please check your CATALINA_HOME setting -goto cleanup +echo The CATALINA_HOME environment variable is not defined correctly +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 - - -rem ----- Prepare Appropriate Java Execution Commands ------------------------- - -if not "%OS%" == "Windows_NT" goto noTitle -set _STARTJAVA=start "Catalina" "%JAVA_HOME%\bin\java" -set _RUNJAVA="%JAVA_HOME%\bin\java" -goto gotTitle -:noTitle -set _STARTJAVA=start "%JAVA_HOME%\bin\java" -set _RUNJAVA="%JAVA_HOME%\bin\java" -:gotTitle +rem Get standard environment variables +if exist "%CATALINA_HOME%\bin\setenv.bat" call "%CATALINA_HOME%\bin\setenv.bat" -rem ----- Set Up The Runtime Classpath ---------------------------------------- +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" -set CP=%CATALINA_HOME%\bin\bootstrap.jar;%JAVA_HOME%\lib\tools.jar +rem Add on extra jar files to CLASSPATH if "%JSSE_HOME%" == "" goto noJsse -set CP=%CP%;%JSSE_HOME%\lib\jcert.jar;%JSSE_HOME%\lib\jnet.jar;%JSSE_HOME%\lib\jsse.jar +set CLASSPATH=%CLASSPATH%;%JSSE_HOME%\lib\jcert.jar;%JSSE_HOME%\lib\jnet.jar;%JSSE_HOME%\lib\jsse.jar :noJsse -set CLASSPATH=%CP% -echo Using CATALINA_BASE: %CATALINA_BASE% -echo Using CATALINA_HOME: %CATALINA_HOME% -echo Using CLASSPATH: %CLASSPATH% -echo Using JAVA_HOME: %JAVA_HOME% +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 rem ----- Execute The Requested Command --------------------------------------- -if "%1" == "env" goto doEnv -if "%1" == "run" goto doRun -if "%1" == "start" goto doStart -if "%1" == "stop" goto doStop - -:doUsage -echo Usage: catalina ( env ^| run ^| start ^| stop ) -echo Commands: -echo env - Set up environment variables that Catalina would use -echo run - Start Catalina in the current window -echo start - Start Catalina in a separate window -echo stop - Stop Catalina -goto cleanup +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_ADDRESS%" == "" got gotJpdaAddress +set JPDA_ADDRESS=jdbconn +:gotJpdaAddress +shift +:noJpda + +if ""%1"" == ""debug"" goto doDebug +if ""%1"" == ""embedded"" goto doEmbedded +if ""%1"" == ""run"" goto doRun +if ""%1"" == ""start"" goto doStart +if ""%1"" == ""stop"" goto doStop + +echo Usage: catalina ( commands ... ) +echo commands: +echo debug Start Catalina in a debugger +echo debug -security Debug Catalina with a security manager +echo embedded Start Catalina in embedded mode +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 +goto end + +:doDebug +shift +set _EXECJAVA=%_RUNJDB% +set DEBUG_OPTS=-sourcepath "%CATALINA_HOME%\..\..\jakarta-tomcat-4.0\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 -:doEnv -goto finish +:doEmbedded +shift +set MAINCLASS=org.apache.catalina.startup.Embedded +goto execCmd :doRun -if "%2" == "-security" goto doRunSecure -%_RUNJAVA% %CATALINA_OPTS% -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Bootstrap %2 %3 %4 %5 %6 %7 %8 %9 start -goto cleanup -:doRunSecure -%_RUNJAVA% %CATALINA_OPTS% -Djava.security.manager -Djava.security.policy=="%CATALINA_BASE%/conf/catalina.policy" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Bootstrap %3 %4 %5 %6 %7 %8 %9 start -goto cleanup +shift +if not ""%1"" == ""-security"" goto execCmd +shift +echo Using Security Manager +set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy +goto execCmd :doStart -if "%2" == "-security" goto doStartSecure -%_STARTJAVA% %CATALINA_OPTS% -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Bootstrap %2 %3 %4 %5 %6 %7 %8 %9 start -goto cleanup -:doStartSecure +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 -%_STARTJAVA% %CATALINA_OPTS% -Djava.security.manager -Djava.security.policy=="%CATALINA_BASE%/conf/catalina.policy" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Bootstrap %3 %4 %5 %6 %7 %8 %9 start -goto cleanup +set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy +goto execCmd :doStop -%_RUNJAVA% %CATALINA_OPTS% -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Bootstrap %2 %3 %4 %5 %6 %7 %8 %9 stop -goto cleanup - - - -rem ----- Restore Environment Variables --------------------------------------- +shift +set ACTION=stop +goto execCmd + +: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=dt_shmem,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% -Xrunjdwp:transport=dt_shmem,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 -:cleanup -set CATALINA_BASE=%_CATALINA_BASE% -set _CATALINA_BASE= -set CATALINA_HOME=%_CATALINA_HOME% -set _CATALINA_HOME= -set CLASSPATH=%_CLASSPATH% -set _CLASSPATH= -set CP=%_CP% -set _LIBJARS= -set _RUNJAVA= -set _STARTJAVA= -:finish +:end 1.20.2.1 +149 -153 jakarta-tomcat-4.0/catalina/src/bin/catalina.sh Index: catalina.sh =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/catalina.sh,v retrieving revision 1.20 retrieving revision 1.20.2.1 diff -u -r1.20 -r1.20.2.1 --- catalina.sh 14 Sep 2001 20:01:21 -0000 1.20 +++ catalina.sh 30 Jan 2002 18:10:39 -0000 1.20.2.1 @@ -1,127 +1,119 @@ #!/bin/sh # ----------------------------------------------------------------------------- -# catalina.sh - Start/Stop Script for the CATALINA Server +# Start/Stop Script for the CATALINA Server # # Environment Variable Prequisites # -# 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_HOME May point at your Catalina "build" directory. # -# CATALINA_HOME (Optional) May point at your Catalina "build" directory. -# If not present, the current working directory is assumed. +# 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_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. +# CATALINA_TMPDIR (Optional) Directory path location of temporary directory +# the JVM should use (java.io.tmpdir). Defaults to +# $CATALINA_BASE/temp. # -# JPDA_OPTS (Optional) Java runtime options used when the "jpda start" -# command is executed. Defaults to -# "-classic -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n" +# JAVA_HOME Must point at your Java Development Kit installation. # -# 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. +# JAVA_OPTS (Optional) Java runtime options used when the "start", +# "stop", or "run" command is executed. # -# $Id: catalina.sh,v 1.20 2001/09/14 20:01:21 craigmcc Exp $ +# 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. +# +# $Id: catalina.sh,v 1.20.2.1 2002/01/30 18:10:39 patrickl 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" -# ----- Verify and Set Required Environment Variables ------------------------- +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 -if [ -z "$CATALINA_HOME" ] ; then - ## resolve links - $0 may be a link to home - PRG=$0 - progname=`basename $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 - - CATALINA_HOME_1=`dirname "$PRG"`/.. - echo "Guessing CATALINA_HOME from catalina.sh to ${CATALINA_HOME_1}" - if [ -d ${CATALINA_HOME_1}/conf ] ; then - CATALINA_HOME=${CATALINA_HOME_1} - echo "Setting CATALINA_HOME to $CATALINA_HOME" - fi -fi - -if [ -z "$CATALINA_OPTS" ] ; then - CATALINA_OPTS="" +# 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 -if [ -z "$JPDA_OPTS" ] ; then - JPDA_OPTS="-classic -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,address=8000,server=y,suspend=n" +# 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"` + [ -n "$JSSE_HOME" ] && JSSE_HOME=`cygpath --path --unix "$JSSE_HOME"` fi -if [ -z "$JAVA_HOME" ] ; then - echo You must set JAVA_HOME to point at your Java Development Kit installation +# 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 - -# ----- Cygwin Unix Paths Setup ----------------------------------------------- - -# Cygwin support. $cygwin _must_ be set to either true or false. -case "`uname`" in - CYGWIN*) cygwin=true ;; - *) cygwin=false ;; -esac - -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$CATALINA_HOME" ] && - CATALINA_HOME=`cygpath --unix "$CATALINA_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --unix "$JAVA_HOME"` +# 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 - -# ----- Set Up The System Classpath ------------------------------------------- - -CP="$CATALINA_HOME/bin/bootstrap.jar" - -if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then - CP=$CP:"$JAVA_HOME/lib/tools.jar" -fi -if [ -f "$JSSE_HOME/lib/jsse.jar" ] ; then - CP=$CP:"$JSSE_HOME/lib/jcert.jar":"$JSSE_HOME/lib/jnet.jar":"$JSSE_HOME/lib/jsse.jar" +if [ -z "$CATALINA_BASE" ] ; then + CATALINA_BASE="$CATALINA_HOME" fi - -# ----- Cygwin Windows Paths Setup -------------------------------------------- - -# convert the existing path to windows -if $cygwin ; then - CP=`cygpath --path --windows "$CP"` - CATALINA_HOME=`cygpath --path --windows "$CATALINA_HOME"` - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` +if [ -z "$CATALINA_TMPDIR" ] ; then + # Define the java.io.tmpdir to use for Catalina + CATALINA_TMPDIR="$CATALINA_BASE"/temp fi - -# ----- Set Up CATALINA_BASE If Necessary ------------------------------------- - -if [ -z "$CATALINA_BASE" ] ; then - CATALINA_BASE=$CATALINA_HOME +# 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"` + JSSE_HOME=`cygpath --path --windows "$JSSE_HOME"` fi - # ----- Execute The Requested Command ----------------------------------------- -echo "Using CLASSPATH: $CP" -echo "Using CATALINA_BASE: $CATALINA_BASE" -echo "Using CATALINA_HOME: $CATALINA_HOME" -echo "Using JAVA_HOME: $JAVA_HOME" +echo "Using CATALINA_BASE: $CATALINA_BASE" +echo "Using CATALINA_HOME: $CATALINA_HOME" +echo "Using CATALINA_TMPDIR: $CATALINA_TMPDIR" +echo "Using JAVA_HOME: $JAVA_HOME" if [ "$1" = "jpda" ] ; then - CATALINA_OPTS="${CATALINA_OPTS} ${JPDA_OPTS}" + if [ -z "$JPDA_ADDRESS" ]; then + JPDA_ADDRESS="8000" + fi + if [ -z "$JDPA_OPTS" ]; then + JPDA_OPTS="-Xdebug -Xrunjdwp:transport=dt_socket,address=$JPDA_ADDRESS,server=y,suspend=n" + fi + CATALINA_OPTS="$CATALINA_OPTS $JPDA_OPTS" shift fi @@ -129,100 +121,104 @@ shift if [ "$1" = "-security" ] ; then + echo "Using Security Manager" shift - $JAVA_HOME/bin/jdb \ - $CATALINA_OPTS \ - -sourcepath $CATALINA_HOME/../../jakarta-tomcat-4.0/catalina/src/share \ - -classpath $CP \ - -Dcatalina.base=$CATALINA_BASE \ - -Dcatalina.home=$CATALINA_HOME \ - org.apache.catalina.startup.Bootstrap "$@" start + exec "$_RUNJDB" $JAVA_OPTS $CATALINA_OPTS \ + -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ + -sourcepath "$CATALINA_HOME"/../../jakarta-tomcat-4.0/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 - $JAVA_HOME/bin/jdb \ - $CATALINA_OPTS \ - -sourcepath $CATALINA_HOME/../../jakarta-tomcat-4.0/catalina/src/share \ - -classpath $CP \ - -Dcatalina.base=$CATALINA_BASE \ - -Dcatalina.home=$CATALINA_HOME \ - org.apache.catalina.startup.Bootstrap "$@" start + exec "$_RUNJDB" $JAVA_OPTS $CATALINA_OPTS \ + -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ + -sourcepath "$CATALINA_HOME"/../../jakarta-tomcat-4.0/catalina/src/share \ + -Dcatalina.base="$CATALINA_BASE" \ + -Dcatalina.home="$CATALINA_HOME" \ + -Djava.io.tmpdir="$CATALINA_TMPDIR" \ + org.apache.catalina.startup.Bootstrap "$@" start fi elif [ "$1" = "embedded" ] ; then shift - for i in ${CATALINA_HOME}/server/lib/*.jar ; do - CP=$i:${CP} - done - for i in ${CATALINA_HOME}/common/lib/*.jar ; do - CP=$i:${CP} - done - echo Embedded Classpath: $CP - $JAVA_HOME/bin/java $CATALINA_OPTS -classpath $CP \ - -Dcatalina.base=$CATALINA_BASE \ - -Dcatalina.home=$CATALINA_HOME \ - org.apache.catalina.startup.Embedded "$@" - -elif [ "$1" = "env" ] ; then - - export BP CATALINA_HOME CP - exit 0 + echo "Embedded Classpath: $CLASSPATH" + 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.Embedded "$@" -elif [ "$1" = "run" ] ; then +elif [ "$1" = "run" ]; then shift if [ "$1" = "-security" ] ; then - echo Using Security Manager + echo "Using Security Manager" shift - $JAVA_HOME/bin/java $CATALINA_OPTS -classpath $CP \ - -Djava.security.manager \ - -Djava.security.policy==$CATALINA_BASE/conf/catalina.policy \ - -Dcatalina.base=$CATALINA_BASE \ - -Dcatalina.home=$CATALINA_HOME \ - org.apache.catalina.startup.Bootstrap "$@" start + 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 - $JAVA_HOME/bin/java $CATALINA_OPTS -classpath $CP \ - -Dcatalina.base=$CATALINA_BASE \ - -Dcatalina.home=$CATALINA_HOME \ - org.apache.catalina.startup.Bootstrap "$@" start + 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 + touch "$CATALINA_BASE"/logs/catalina.out if [ "$1" = "-security" ] ; then - echo Using Security Manager + echo "Using Security Manager" shift - $JAVA_HOME/bin/java $CATALINA_OPTS -classpath $CP \ - -Djava.security.manager \ - -Djava.security.policy==$CATALINA_BASE/conf/catalina.policy \ - -Dcatalina.base=$CATALINA_BASE \ - -Dcatalina.home=$CATALINA_HOME \ - org.apache.catalina.startup.Bootstrap "$@" start \ - >> $CATALINA_BASE/logs/catalina.out 2>&1 & + "$_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 & else - $JAVA_HOME/bin/java $CATALINA_OPTS -classpath $CP \ - -Dcatalina.base=$CATALINA_BASE \ - -Dcatalina.home=$CATALINA_HOME \ - org.apache.catalina.startup.Bootstrap "$@" start \ - >> $CATALINA_BASE/logs/catalina.out 2>&1 & + "$_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 & fi elif [ "$1" = "stop" ] ; then shift - $JAVA_HOME/bin/java $CATALINA_OPTS -classpath $CP \ - -Dcatalina.base=$CATALINA_BASE \ - -Dcatalina.home=$CATALINA_HOME \ - org.apache.catalina.startup.Bootstrap "$@" stop + 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 "$@" stop else - echo "Usage: catalina.sh ( env | run | start | stop)" - echo "Commands:" + echo "Usage: catalina.sh ( commands ... )" + echo "commands:" echo " debug Start Catalina in a debugger" echo " debug -security Debug Catalina with a security manager" - echo " env Set up environment variables that would be used" + echo " embedded Start Catalina in embedded mode" 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" 1.2.4.1 +16 -2 jakarta-tomcat-4.0/catalina/src/bin/cpappend.bat Index: cpappend.bat =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/cpappend.bat,v retrieving revision 1.2 retrieving revision 1.2.4.1 diff -u -r1.2 -r1.2.4.1 --- cpappend.bat 5 Sep 2000 01:04:53 -0000 1.2 +++ cpappend.bat 30 Jan 2002 18:10:40 -0000 1.2.4.1 @@ -1,2 +1,16 @@ -set CP=%CP%;%1 -set _LIBJARS=%_LIBJARS%;%1 +rem --------------------------------------------------------------------------- +rem Append a path onto the CLASSPATH +rem +rem $Id: cpappend.bat,v 1.2.4.1 2002/01/30 18:10:40 patrickl Exp $ +rem --------------------------------------------------------------------------- + +rem Get remaining unshifted command line arguments and save them in the +set CMD_LINE_ARGS=%1 +shift +:setArgs +if ""%1""=="""" goto doneSetArgs +set CMD_LINE_ARGS=%CMD_LINE_ARGS% %1 +shift +goto setArgs +:doneSetArgs + 1.2.2.2 +27 -64 jakarta-tomcat-4.0/catalina/src/bin/digest.bat Index: digest.bat =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/digest.bat,v retrieving revision 1.2.2.1 retrieving revision 1.2.2.2 diff -u -r1.2.2.1 -r1.2.2.2 --- digest.bat 12 Oct 2001 16:48:57 -0000 1.2.2.1 +++ digest.bat 30 Jan 2002 18:10:40 -0000 1.2.2.2 @@ -1,78 +1,41 @@ @echo off +if "%OS%" == "Windows_NT" setlocal rem --------------------------------------------------------------------------- -rem digest.bat - Digest password using the algorithm specificied +rem Script to digest password using the algorithm specified rem -rem CATALINA_HOME (Optional) May point at your Catalina "build" directory. -rem If not present, the current working directory is assumed. -rem -rem JAVA_HOME Must point at your Java Development Kit installation. -rem -rem This script is assumed to run from the bin directory or have the -rem CATALINA_HOME env variable set. -rem -rem $Id: digest.bat,v 1.2.2.1 2001/10/12 16:48:57 remm Exp $ +rem $Id: digest.bat,v 1.2.2.2 2002/01/30 18:10:40 patrickl Exp $ rem --------------------------------------------------------------------------- - -rem ----- Save Environment Variables That May Change -------------------------- - -set _CATALINA_HOME=%CATALINA_HOME% -set _CLASSPATH=%CLASSPATH% -set _CP=%CP% - -rem ----- Verify and Set Required Environment Variables ----------------------- - -if not "%JAVA_HOME%" == "" goto gotJavaHome -echo You must set JAVA_HOME to point at your Java Development Kit installation -goto cleanup -:gotJavaHome - +rem Guess CATALINA_HOME if not defined if not "%CATALINA_HOME%" == "" goto gotHome set CATALINA_HOME=. -if exist "%CATALINA_HOME%\server\lib\catalina.jar" goto okHome +if exist "%CATALINA_HOME%\bin\tool-wrapper.bat" goto okHome set CATALINA_HOME=.. :gotHome -if exist "%CATALINA_HOME%\server\lib\catalina.jar" goto okHome -echo Cannot find catalina.jar in %CATALINA_HOME%\server\lib -echo Please check your CATALINA_HOME setting or run this script from the bin directory -goto cleanup +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 ----- Prepare Appropriate Java Execution Commands ------------------------- - -set _RUNJAVA="%JAVA_HOME%\bin\java" - -rem ----- Set Up The Runtime Classpath ---------------------------------------- - -set CP=%CATALINA_HOME%\server\lib\catalina.jar -set CLASSPATH=%CP% -echo Using CLASSPATH: %CLASSPATH% - - -rem ----- Execute The Requested Command --------------------------------------- - -if "%1" == "-a" (if "%2" neq "" (if "%3" neq "" goto doRun)) - -:doUsage -echo Usage: digest -a [algorithm] [credentials] -echo Commands: -echo algorithm - The algorithm to use, i.e. MD5, SHA1 -echo credentials - The credential to digest -goto cleanup - -:doRun -%_RUNJAVA% org.apache.catalina.realm.JDBCRealm %1 %2 %3 -goto cleanup - +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 -rem ----- Restore Environment Variables --------------------------------------- +call "%EXECUTABLE%" -server org.apache.catalina.realm.RealmBase %CMD_LINE_ARGS% -:cleanup -set CATALINA_HOME=%_CATALINA_HOME% -set _CATALINA_HOME= -set CLASSPATH=%_CLASSPATH% -set _CLASSPATH= -set CP=%_CP% -set _CP= -:finish +:end 1.4.2.1 +21 -96 jakarta-tomcat-4.0/catalina/src/bin/digest.sh Index: digest.sh =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/digest.sh,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -r1.4 -r1.4.2.1 --- digest.sh 12 Sep 2001 00:54:28 -0000 1.4 +++ digest.sh 30 Jan 2002 18:10:40 -0000 1.4.2.1 @@ -1,106 +1,31 @@ #!/bin/sh # ----------------------------------------------------------------------------- -# digest.bat - Digest password using the algorithm specificied +# Script to digest password using the algorithm specificied # -# CATALINA_HOME (Optional) May point at your Catalina "build" directory. -# If not present, the current working directory is assumed. -# -# JAVA_HOME Must point at your Java Development Kit installation. -# -# This script is assumed to run from the bin directory or have the -# CATALINA_HOME env variable set. -# -# $Id: digest.sh,v 1.4 2001/09/12 00:54:28 craigmcc Exp $ +# $Id: digest.sh,v 1.4.2.1 2002/01/30 18:10:40 patrickl Exp $ # ----------------------------------------------------------------------------- +# resolve links - $0 may be a softlink +PRG="$0" -# ----- Verify and Set Required Environment Variables ------------------------- - -if [ -z "$CATALINA_HOME" ] ; then - ## resolve links - $0 may be a link to home - PRG=$0 - progname=`basename $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 - - CATALINA_HOME_1=`dirname "$PRG"`/.. - echo "Guessing CATALINA_HOME from digest.sh to ${CATALINA_HOME_1}" - if [ -d ${CATALINA_HOME_1}/conf ] ; then - CATALINA_HOME=${CATALINA_HOME_1} - echo "Setting CATALINA_HOME to $CATALINA_HOME" - fi -fi - -if [ -z "$JAVA_HOME" ] ; then - echo You must set JAVA_HOME to point at your Java Development Kit installation - exit 1 -fi - - -# ----- Cygwin Unix Paths Setup ----------------------------------------------- - -# Cygwin support. $cygwin _must_ be set to either true or false. -case "`uname`" in - CYGWIN*) cygwin=true ;; - *) cygwin=false ;; -esac +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 -# For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$CATALINA_HOME" ] && - CATALINA_HOME=`cygpath --unix "$CATALINA_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --unix "$JAVA_HOME"` -fi - - -# ----- Set Up The System Classpath ------------------------------------------- - -CP="$CATALINA_HOME/server/lib/catalina.jar" - -if [ -f "$JAVA_HOME/lib/tools.jar" ] ; then - CP=$CP:"$JAVA_HOME/lib/tools.jar" -fi - - -# ----- Cygwin Windows Paths Setup -------------------------------------------- - -# convert the existing path to windows -if $cygwin ; then - CP=`cygpath --path --windows "$CP"` - CATALINA_HOME=`cygpath --path --windows "$CATALINA_HOME"` - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` -fi - - -# ----- Execute The Requested Command ----------------------------------------- - -echo "Using CLASSPATH: $CP" -echo "Using CATALINA_HOME: $CATALINA_HOME" -echo "Using JAVA_HOME: $JAVA_HOME" - -if [ "$1" != "-a" ] || [ -z "$2" ] || [ -z "$3" ] ; then - - echo "Usage: digest -a [algorithm] [credentials]" - echo "Commands:" - echo " algorithm - The algorithm to use, i.e. MD5, SHA1" - echo " credentials - The credentials to digest" +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 - -else - - shift - - $JAVA_HOME/bin/java -classpath $CP \ - org.apache.catalina.realm.JDBCRealm -a "$@" - fi + +exec "$PRGDIR"/"$EXECUTABLE" -server org.apache.catalina.realm.RealmBase "$@" 1.4.4.2 +32 -11 jakarta-tomcat-4.0/catalina/src/bin/shutdown.bat Index: shutdown.bat =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/shutdown.bat,v retrieving revision 1.4.4.1 retrieving revision 1.4.4.2 diff -u -r1.4.4.1 -r1.4.4.2 --- shutdown.bat 12 Oct 2001 16:48:57 -0000 1.4.4.1 +++ shutdown.bat 30 Jan 2002 18:10:40 -0000 1.4.4.2 @@ -1,20 +1,41 @@ @echo off +if "%OS%" == "Windows_NT" setlocal rem --------------------------------------------------------------------------- -rem shutdown.bat - Stop Script for the CATALINA Server +rem Stop script for the CATALINA Server rem -rem $Id: shutdown.bat,v 1.4.4.1 2001/10/12 16:48:57 remm Exp $ +rem $Id: shutdown.bat,v 1.4.4.2 2002/01/30 18:10:40 patrickl Exp $ rem --------------------------------------------------------------------------- -set _CATALINA_HOME=%CATALINA_HOME% +rem Guess CATALINA_HOME if not defined if not "%CATALINA_HOME%" == "" goto gotHome set CATALINA_HOME=. -if exist "%CATALINA_HOME%\bin\catalina.bat" goto gotHome +if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome set CATALINA_HOME=.. -if exist "%CATALINA_HOME%\bin\catalina.bat" goto gotHome -echo Unable to determine the value of CATALINA_HOME -goto cleanup :gotHome -"%CATALINA_HOME%\bin\catalina" stop %1 %2 %3 %4 %5 %6 %7 %8 %9 -:cleanup -set CATALINA_HOME=%_CATALINA_HOME% -set _CATALINA_HOME= +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 1.1.4.1 +26 -4 jakarta-tomcat-4.0/catalina/src/bin/shutdown.sh Index: shutdown.sh =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/shutdown.sh,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -u -r1.1 -r1.1.4.1 --- shutdown.sh 11 Aug 2000 05:22:16 -0000 1.1 +++ shutdown.sh 30 Jan 2002 18:10:40 -0000 1.1.4.1 @@ -1,9 +1,31 @@ #!/bin/sh # ----------------------------------------------------------------------------- -# shutdown.sh - Stop Script for the CATALINA Server +# Stop script for the CATALINA Server # -# $Id: shutdown.sh,v 1.1 2000/08/11 05:22:16 craigmcc Exp $ +# $Id: shutdown.sh,v 1.1.4.1 2002/01/30 18:10:40 patrickl Exp $ # ----------------------------------------------------------------------------- -BASEDIR=`dirname $0` -$BASEDIR/catalina.sh stop "$@" +# 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 "$@" 1.3.4.2 +31 -11 jakarta-tomcat-4.0/catalina/src/bin/startup.bat Index: startup.bat =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/startup.bat,v retrieving revision 1.3.4.1 retrieving revision 1.3.4.2 diff -u -r1.3.4.1 -r1.3.4.2 --- startup.bat 12 Oct 2001 16:48:57 -0000 1.3.4.1 +++ startup.bat 30 Jan 2002 18:10:40 -0000 1.3.4.2 @@ -1,21 +1,41 @@ @echo off +if "%OS%" == "Windows_NT" setlocal rem --------------------------------------------------------------------------- -rem startup.bat - Start Script for the CATALINA Server +rem Start script for the CATALINA Server rem -rem $Id: startup.bat,v 1.3.4.1 2001/10/12 16:48:57 remm Exp $ +rem $Id: startup.bat,v 1.3.4.2 2002/01/30 18:10:40 patrickl Exp $ rem --------------------------------------------------------------------------- -set _CATALINA_HOME=%CATALINA_HOME% +rem Guess CATALINA_HOME if not defined if not "%CATALINA_HOME%" == "" goto gotHome set CATALINA_HOME=. -if exist "%CATALINA_HOME%\bin\catalina.bat" goto gotHome +if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome set CATALINA_HOME=.. -if exist "%CATALINA_HOME%\bin\catalina.bat" goto gotHome -echo Unable to determine the value of CATALINA_HOME -goto cleanup :gotHome -"%CATALINA_HOME%\bin\catalina" start %1 %2 %3 %4 %5 %6 %7 %8 %9 -:cleanup -set CATALINA_HOME=%_CATALINA_HOME% -set _CATALINA_HOME= +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 1.1.4.1 +26 -4 jakarta-tomcat-4.0/catalina/src/bin/startup.sh Index: startup.sh =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/startup.sh,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -u -r1.1 -r1.1.4.1 --- startup.sh 11 Aug 2000 05:22:16 -0000 1.1 +++ startup.sh 30 Jan 2002 18:10:40 -0000 1.1.4.1 @@ -1,9 +1,31 @@ #!/bin/sh # ----------------------------------------------------------------------------- -# startup.sh - Start Script for the CATALINA Server +# Start Script for the CATALINA Server # -# $Id: startup.sh,v 1.1 2000/08/11 05:22:16 craigmcc Exp $ +# $Id: startup.sh,v 1.1.4.1 2002/01/30 18:10:40 patrickl Exp $ # ----------------------------------------------------------------------------- -BASEDIR=`dirname $0` -$BASEDIR/catalina.sh start "$@" +# 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" start "$@" No revision No revision 1.1.2.1 +1 -1 jakarta-tomcat-4.0/catalina/src/bin/setclasspath.bat Index: setclasspath.bat =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/setclasspath.bat,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -u -r1.1 -r1.1.2.1 --- setclasspath.bat 15 Jan 2002 02:55:38 -0000 1.1 +++ setclasspath.bat 30 Jan 2002 18:10:40 -0000 1.1.2.1 @@ -1,7 +1,7 @@ rem --------------------------------------------------------------------------- rem Set CLASSPATH and Java options rem -rem $Id: setclasspath.bat,v 1.1 2002/01/15 02:55:38 patrickl Exp $ +rem $Id: setclasspath.bat,v 1.1.2.1 2002/01/30 18:10:40 patrickl Exp $ rem --------------------------------------------------------------------------- rem Make sure prerequisite environment variables are set 1.1.2.1 +1 -1 jakarta-tomcat-4.0/catalina/src/bin/setclasspath.sh Index: setclasspath.sh =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/setclasspath.sh,v retrieving revision 1.1 retrieving revision 1.1.2.1 diff -u -r1.1 -r1.1.2.1 --- setclasspath.sh 15 Jan 2002 02:55:38 -0000 1.1 +++ setclasspath.sh 30 Jan 2002 18:10:40 -0000 1.1.2.1 @@ -1,7 +1,7 @@ # ----------------------------------------------------------------------------- # Set CLASSPATH and Java options # -# $Id: setclasspath.sh,v 1.1 2002/01/15 02:55:38 patrickl Exp $ +# $Id: setclasspath.sh,v 1.1.2.1 2002/01/30 18:10:40 patrickl Exp $ # ----------------------------------------------------------------------------- # Make sure prerequisite environment variables are set 1.3.2.1 +1 -1 jakarta-tomcat-4.0/catalina/src/bin/tool-wrapper.bat Index: tool-wrapper.bat =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/tool-wrapper.bat,v retrieving revision 1.3 retrieving revision 1.3.2.1 diff -u -r1.3 -r1.3.2.1 --- tool-wrapper.bat 15 Jan 2002 02:55:38 -0000 1.3 +++ tool-wrapper.bat 30 Jan 2002 18:10:40 -0000 1.3.2.1 @@ -15,7 +15,7 @@ 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 2002/01/15 02:55:38 patrickl Exp $ +rem $Id: tool-wrapper.bat,v 1.3.2.1 2002/01/30 18:10:40 patrickl Exp $ rem --------------------------------------------------------------------------- rem Guess CATALINA_HOME if not defined 1.4.2.1 +1 -1 jakarta-tomcat-4.0/catalina/src/bin/tool-wrapper.sh Index: tool-wrapper.sh =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/tool-wrapper.sh,v retrieving revision 1.4 retrieving revision 1.4.2.1 diff -u -r1.4 -r1.4.2.1 --- tool-wrapper.sh 15 Jan 2002 02:55:38 -0000 1.4 +++ tool-wrapper.sh 30 Jan 2002 18:10:40 -0000 1.4.2.1 @@ -14,7 +14,7 @@ # JAVA_OPTS (Optional) Java runtime options used when the "start", # "stop", or "run" command is executed. # -# $Id: tool-wrapper.sh,v 1.4 2002/01/15 02:55:38 patrickl Exp $ +# $Id: tool-wrapper.sh,v 1.4.2.1 2002/01/30 18:10:40 patrickl Exp $ # ----------------------------------------------------------------------------- # OS specific support. $var _must_ be set to either true or false. No revision No revision 1.4.2.2 +52 -51 jakarta-tomcat-4.0/jasper/src/bin/jasper.bat Index: jasper.bat =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/bin/jasper.bat,v retrieving revision 1.4.2.1 retrieving revision 1.4.2.2 diff -u -r1.4.2.1 -r1.4.2.2 --- jasper.bat 12 Oct 2001 17:10:52 -0000 1.4.2.1 +++ jasper.bat 30 Jan 2002 18:10:40 -0000 1.4.2.2 @@ -1,69 +1,70 @@ @echo off +if "%OS%" == "Windows_NT" setlocal rem --------------------------------------------------------------------------- -rem jasper.bat - Global Script for Jasper +rem Script for Jasper compiler rem -rem Environment Variable Prequisites: -rem JASPER_HOME (Optional) -rem May point at your Jasper "build" directory. -rem If not present, the current working directory is assumed. -rem JASPER_OPTS (Optional) -rem Java runtime options -rem JAVA_HOME -rem Must point at your Java Development Kit installation. +rem Environment Variable Prequisites rem -rem $Id: jasper.bat,v 1.4.2.1 2001/10/12 17:10:52 craigmcc Exp $ +rem JASPER_HOME May point at your Catalina "build" directory. +rem +rem JASPER_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: jasper.bat,v 1.4.2.2 2002/01/30 18:10:40 patrickl Exp $ rem --------------------------------------------------------------------------- -rem ----- Save Environment Variables That May Change -------------------------- - -set _JASPER_HOME=%JASPER_HOME% -set _CLASSPATH=%CLASSPATH% - -rem ----- Verify and Set Required Environment Variables ----------------------- - -if not "%JAVA_HOME%" == "" goto gotJava -echo You must set JAVA_HOME to point at your Java Development Kit installation -goto cleanup -:gotJava - +rem Guess JASPER_HOME if not defined if not "%JASPER_HOME%" == "" goto gotHome set JASPER_HOME=. +if exist "%JASPER_HOME%\bin\jasper.bat" goto okHome +set JASPER_HOME=.. :gotHome -if exist %JASPER_HOME%\bin\jpappend.bat goto okHome -echo Using JASPER_HOME: %JASPER_HOME% -echo JASPER_HOME/bin/jpappend.bat does not exist. Please specify JASPER_HOME properly. -goto cleanup +if exist "%JASPER_HOME%\bin\jasper.bat" goto okHome +echo The JASPER_HOME environment variable is not defined correctly +echo This environment variable is needed to run this program +goto end :okHome -rem ----- Set Up The Runtime Classpath ---------------------------------------- +rem Get standard environment variables +if exist "%JASPER_HOME%\bin\setenv.bat" call "%JASPER_HOME%\bin\setenv.bat" -rem FIXME set CLASSPATH=%JASPER_HOME%\dummy -rem FIXME below -set CLASSPATH=%JASPER_HOME%\classes -for %%i in (%JASPER_HOME%\lib\*.jar) do call %JASPER_HOME%\bin\jpappend.bat %%i -for %%i in (%JASPER_HOME%\jasper\*.jar) do call %JASPER_HOME%\bin\jpappend.bat %%i +rem Get standard Java environment variables +if exist "%JASPER_HOME%\bin\setclasspath.bat" goto okSetclasspath +echo Cannot find %JASPER_HOME%\bin\setclasspath.bat +echo This file is needed to run this program +goto end +:okSetclasspath +set BASEDIR=%JASPER_HOME% +call "%JASPER_HOME%\bin\setclasspath.bat" + +rem Add on extra jar files to CLASSPATH +for %%i in ("%JASPER_HOME%\lib\*.jar") do call "%JASPER_HOME%\bin\cpappend.bat" %%i +for %%i in ("%JASPER_HOME%\shared\lib\*.jar") do call "%JASPER_HOME%\bin\cpappend.bat" %%i set CLASSPATH=%CLASSPATH%;%JASPER_HOME%\common\lib\servlet.jar -echo Using CLASSPATH: %CLASSPATH% - -rem ----- Execute The Requested Command --------------------------------------- -if "%1" == "jspc" goto doJspc - -:doUsage -echo Usage: jasper ( jspc ) +rem Parse arguments +if ""%1"" == ""jspc"" goto doJspc +echo Usage: jasper ( jspc ) echo Commands: -echo jspc - Run the jasper offline JSP compiler -goto cleanup - +echo jspc - Run the offline JSP compiler +goto end :doJspc -java %JASPER_OPTS% -Djasper.home=%JASPER_HOME% org.apache.jasper.JspC %2 %3 %4 %5 %6 %7 %8 %9 -goto cleanup +shift + +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 ----- Restore Environment Variables --------------------------------------- +%_RUNJAVA% %JAVA_OPTS% %JASPER_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djasper.home="%JASPER_HOME%" org.apache.jasper.JspC %CMD_LINE_ARGS% -:cleanup -set JASPER_HOME=%_JASPER_HOME% -set _JASPER_HOME= -set CLASSPATH=%_CLASSPATH% -set _CLASSPATH= -:finish +:end 1.5.2.1 +62 -83 jakarta-tomcat-4.0/jasper/src/bin/jasper.sh Index: jasper.sh =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/bin/jasper.sh,v retrieving revision 1.5 retrieving revision 1.5.2.1 diff -u -r1.5 -r1.5.2.1 --- jasper.sh 13 Sep 2001 15:22:45 -0000 1.5 +++ jasper.sh 30 Jan 2002 18:10:40 -0000 1.5.2.1 @@ -1,117 +1,96 @@ #!/bin/sh # ----------------------------------------------------------------------------- -# jasper.sh - Global Script Jasper +# Script for Jasper compiler # # Environment Variable Prequisites # -# Environment Variable Prequisites: -# JASPER_HOME (Optional) -# May point at your Jasper "build" directory. -# If not present, the current working directory is assumed. -# JASPER_OPTS (Optional) -# Java runtime options -# JAVA_HOME -# Must point at your Java Development Kit installation. +# JASPER_HOME May point at your Catalina "build" directory. # -# $Id: jasper.sh,v 1.5 2001/09/13 15:22:45 craigmcc Exp $ +# JASPER_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: jasper.sh,v 1.5.2.1 2002/01/30 18:10:40 patrickl Exp $ # ----------------------------------------------------------------------------- +# OS specific support. $var _must_ be set to either true or false. +cygwin=false +case "`uname`" in +CYGWIN*) cygwin=true;; +esac -# ----- Verify and Set Required Environment Variables ------------------------- - -if [ -z "$JASPER_HOME" ] ; then - ## resolve links - $0 may be a link to home - PRG=$0 - progname=`basename $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 - - JASPER_HOME_1=`dirname "$PRG"`/.. - echo "Guessing JASPER_HOME from catalina.sh to ${JASPER_HOME_1}" - if [ -d ${JASPER_HOME_1}/conf ] ; then - JASPER_HOME=${JASPER_HOME_1} - echo "Setting JASPER_HOME to $JASPER_HOME" - fi -fi +# resolve links - $0 may be a softlink +PRG="$0" -if [ "$JASPER_OPTS" = "" ] ; then - JASPER_OPTS="" -fi +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 -if [ "$JAVA_HOME" = "" ] ; then - echo "You must set JAVA_HOME to point at your Java Development Kit installation" - exit 1 +# Get standard environment variables +PRGDIR=`dirname "$PRG"` +JASPER_HOME=`cd "$PRGDIR/.." ; pwd` +if [ -r "$JASPER_HOME"/bin/setenv.sh ]; then + . "$JASPER_HOME"/bin/setenv.sh fi - -# ----- Cygwin Unix Paths Setup ----------------------------------------------- - -# Cygwin support. $cygwin _must_ be set to either true or false. -case "`uname`" in - CYGWIN*) cygwin=true ;; - *) cygwin=false ;; -esac - # For Cygwin, ensure paths are in UNIX format before anything is touched -if $cygwin ; then - [ -n "$JASPER_HOME" ] && - JASPER_HOME=`cygpath --unix "$JASPER_HOME"` - [ -n "$JAVA_HOME" ] && - JAVA_HOME=`cygpath --unix "$JAVA_HOME"` +if $cygwin; then + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` + [ -n "$JASPER_HOME" ] && JASPER_HOME=`cygpath --unix "$JASPER_HOME"` + [ -n "$CLASSPATH" ] && CLASSPATH=`cygpath --path --unix "$CLASSPATH"` fi +# Get standard Java environment variables +if [ -r "$JASPER_HOME"/bin/setclasspath.sh ]; then + BASEDIR="$JASPER_HOME" + . "$JASPER_HOME"/bin/setclasspath.sh +else + echo "Cannot find $JASPER_HOME/bin/setclasspath.sh" + echo "This file is needed to run this program" + exit 1 +fi -# ----- Set Up The System Classpath ------------------------------------------- - -CP="$JASPER_HOME/classes" -for i in $JASPER_HOME/jasper/*.jar ; do - CP=$CP:"$i" +# Add on extra jar files to CLASSPATH +for i in "$JASPER_HOME"/lib/*.jar; do + CLASSPATH="$CLASSPATH":"$i" done -for i in $JASPER_HOME/lib/*.jar ; do - CP=$CP:"$i" +for i in "$JASPER_HOME"/shared/lib/*.jar; do + CLASSPATH="$CLASSPATH":"$i" done -CP=$CP:"$JASPER_HOME/common/classes" -for i in $JASPER_HOME/common/lib/*.jar ; do - CP=$CP:"$i" -done - - -# ----- Cygwin Windows Paths Setup -------------------------------------------- +CLASSPATH="$CLASSPATH":"$JASPER_HOME"/common/lib/servlet.jar -# convert the existing path to windows -if $cygwin ; then - CP=`cygpath --path --windows "$CP"` - JASPER_HOME=`cygpath --path --windows "$JASPER_HOME"` - JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"` + JASPER_HOME=`cygpath --path --windows "$JASPER_HOME"` + CLASSPATH=`cygpath --path --windows "$CLASSPATH"` fi - # ----- Execute The Requested Command ----------------------------------------- -echo "Using CLASSPATH: $CP" -echo "Using JASPER_HOME: $JASPER_HOME" -echo "Using JAVA_HOME: $JAVA_HOME" - if [ "$1" = "jspc" ] ; then shift - java $JASPER_OPTS -classpath $CP \ - -Djasper.home=$JASPER_HOME \ - org.apache.jasper.JspC "$@" + exec "$_RUNJAVA" $JAVA_OPTS $JASPER_OPTS \ + -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \ + -Djasper.home="$JASPER_HOME" \ + org.apache.jasper.JspC "$@" else - echo "Usage: jasper.sh [ jspc ]" + echo "Usage: jasper.sh ( jspc )" echo "Commands:" - echo jspc - Run the jasper offline JSP compiler + echo " jspc - Run the offline JSP compiler" exit 1 fi 1.1.4.1 +35 -26 jakarta-tomcat-4.0/jasper/src/bin/jspc.bat Index: jspc.bat =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/bin/jspc.bat,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -u -r1.1 -r1.1.4.1 --- jspc.bat 12 Aug 2000 00:52:05 -0000 1.1 +++ jspc.bat 30 Jan 2002 18:10:40 -0000 1.1.4.1 @@ -1,32 +1,41 @@ @echo off -rem --- -rem jspc.bat - Script ro run the Jasper "offline JSP compiler" +if "%OS%" == "Windows_NT" setlocal +rem --------------------------------------------------------------------------- +rem Script to run the Jasper "offline JSP compiler" rem -rem $Id: jspc.bat,v 1.1 2000/08/12 00:52:05 pierred Exp $ -rem --- +rem $Id: jspc.bat,v 1.1.4.1 2002/01/30 18:10:40 patrickl Exp $ +rem --------------------------------------------------------------------------- -rem --- Save Env Variables -set _JASPER_HOME=%JASPER_HOME% - -rem --- Set Env Variables -if not "%JASPER_HOME%" == "" goto gotJasperHome -echo JASPER_HOME not set. Assuming parent directory. +rem Guess JASPER_HOME if not defined +if not "%JASPER_HOME%" == "" goto gotHome +set JASPER_HOME=. +if exist "%JASPER_HOME%\bin\jspc.bat" goto okHome set JASPER_HOME=.. -:gotJasperHome +:gotHome +if exist "%JASPER_HOME%\bin\jspc.bat" goto okHome +echo The JASPER_HOME environment variable is not defined correctly +echo This environment variable is needed to run this program +goto end +:okHome + +set EXECUTABLE=%JASPER_HOME%\bin\jasper.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 -rem --- got jasper.bat? -if exist %JASPER_HOME%\bin\jasper.bat goto gotJasperBat -echo Using JASPER_HOME: %JASPER_HOME% -echo jasper.bat does not exist. Please specify JASPER_HOME properly. -goto restore -:gotJasperbat - -rem --- jspc is invoked via jasper's generic script -%JASPER_HOME%\bin\jasper jspc %1 %2 %3 %4 %5 %6 %7 %8 %9 - -rem --- Restore Env Variables -:restore -set JASPER_HOME=%_JASPER_HOME% -set _JASPER_HOME= +call "%EXECUTABLE%" jspc %CMD_LINE_ARGS% -:eof +:end 1.1.4.1 +26 -4 jakarta-tomcat-4.0/jasper/src/bin/jspc.sh Index: jspc.sh =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/bin/jspc.sh,v retrieving revision 1.1 retrieving revision 1.1.4.1 diff -u -r1.1 -r1.1.4.1 --- jspc.sh 12 Aug 2000 00:52:05 -0000 1.1 +++ jspc.sh 30 Jan 2002 18:10:40 -0000 1.1.4.1 @@ -1,9 +1,31 @@ #!/bin/sh # ----------------------------------------------------------------------------- -# jspc.sh - Script ro run the Jasper "offline JSP compiler" +# Script to run the Jasper "offline JSP compiler" # -# $Id: jspc.sh,v 1.1 2000/08/12 00:52:05 pierred Exp $ +# $Id: jspc.sh,v 1.1.4.1 2002/01/30 18:10:40 patrickl Exp $ # ----------------------------------------------------------------------------- -BASEDIR=`dirname $0` -$BASEDIR/jasper.sh jspc "$@" +# 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=jasper.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" jspc "$@"
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>