tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kkoli...@apache.org
Subject svn commit: r895392 - in /tomcat/trunk/bin: catalina.bat digest.bat service.bat setclasspath.bat shutdown.bat startup.bat tool-wrapper.bat version.bat
Date Sun, 03 Jan 2010 14:02:33 GMT
Author: kkolinko
Date: Sun Jan  3 14:02:31 2010
New Revision: 895392

URL: http://svn.apache.org/viewvc?rev=895392&view=rev
Log:
Followup to r895191
Fix calling Tomcat Windows scripts from a directory containing '&' character,
and allow to use this character in the names of CATALINA_HOME/CATALINA_BASE directories.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48464#c4

Note, that both 'set' and 'echo' commands have to use quotes.

Modified:
    tomcat/trunk/bin/catalina.bat
    tomcat/trunk/bin/digest.bat
    tomcat/trunk/bin/service.bat
    tomcat/trunk/bin/setclasspath.bat
    tomcat/trunk/bin/shutdown.bat
    tomcat/trunk/bin/startup.bat
    tomcat/trunk/bin/tool-wrapper.bat
    tomcat/trunk/bin/version.bat

Modified: tomcat/trunk/bin/catalina.bat
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/catalina.bat?rev=895392&r1=895391&r2=895392&view=diff
==============================================================================
--- tomcat/trunk/bin/catalina.bat (original)
+++ tomcat/trunk/bin/catalina.bat Sun Jan  3 14:02:31 2010
@@ -74,12 +74,12 @@
 rem ---------------------------------------------------------------------------
 
 rem Guess CATALINA_HOME if not defined
-set CURRENT_DIR=%cd%
+set "CURRENT_DIR=%cd%"
 if not "%CATALINA_HOME%" == "" goto gotHome
-set CATALINA_HOME=%CURRENT_DIR%
+set "CATALINA_HOME=%CURRENT_DIR%"
 if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
 cd ..
-set CATALINA_HOME=%cd%
+set "CATALINA_HOME=%cd%"
 cd "%CURRENT_DIR%"
 :gotHome
 if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
@@ -102,11 +102,11 @@
 
 rem Get standard Java environment variables
 if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath
-echo Cannot find %CATALINA_HOME%\bin\setclasspath.bat
+echo Cannot find "%CATALINA_HOME%\bin\setclasspath.bat"
 echo This file is needed to run this program
 goto end
 :okSetclasspath
-set BASEDIR=%CATALINA_HOME%
+set "BASEDIR=%CATALINA_HOME%"
 call "%CATALINA_HOME%\bin\setclasspath.bat" %1
 if errorlevel 1 goto end
 
@@ -114,25 +114,25 @@
 rem Note that there are no quotes as we do not want to introduce random
 rem quotes into the CLASSPATH
 if "%CLASSPATH%" == "" goto emptyClasspath
-set CLASSPATH=%CLASSPATH%;
+set "CLASSPATH=%CLASSPATH%;"
 :emptyClasspath
-set CLASSPATH=%CLASSPATH%%CATALINA_HOME%\bin\bootstrap.jar
+set "CLASSPATH=%CLASSPATH%%CATALINA_HOME%\bin\bootstrap.jar"
 
 if not "%CATALINA_BASE%" == "" goto gotBase
-set CATALINA_BASE=%CATALINA_HOME%
+set "CATALINA_BASE=%CATALINA_HOME%"
 :gotBase
 
 if not "%CATALINA_TMPDIR%" == "" goto gotTmpdir
-set CATALINA_TMPDIR=%CATALINA_BASE%\temp
+set "CATALINA_TMPDIR=%CATALINA_BASE%\temp"
 :gotTmpdir
 
 rem Add tomcat-juli.jar to classpath
 rem tomcat-juli.jar can be over-ridden per instance
 if not exist "%CATALINA_BASE%\bin\tomcat-juli.jar" goto juliClasspathHome
-set CLASSPATH=%CLASSPATH%;%CATALINA_BASE%\bin\tomcat-juli.jar
+set "CLASSPATH=%CLASSPATH%;%CATALINA_BASE%\bin\tomcat-juli.jar"
 goto juliClasspathDone
 :juliClasspathHome
-set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\tomcat-juli.jar
+set "CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\tomcat-juli.jar"
 :juliClasspathDone
 
 if not "%LOGGING_CONFIG%" == "" goto noJuliConfig
@@ -149,16 +149,16 @@
 
 rem ----- Execute The Requested Command ---------------------------------------
 
-echo Using CATALINA_BASE:   %CATALINA_BASE%
-echo Using CATALINA_HOME:   %CATALINA_HOME%
-echo Using CATALINA_TMPDIR: %CATALINA_TMPDIR%
+echo Using CATALINA_BASE:   "%CATALINA_BASE%"
+echo Using CATALINA_HOME:   "%CATALINA_HOME%"
+echo Using CATALINA_TMPDIR: "%CATALINA_TMPDIR%"
 if ""%1"" == ""debug"" goto use_jdk
-echo Using JRE_HOME:        %JRE_HOME%
+echo Using JRE_HOME:        "%JRE_HOME%"
 goto java_dir_displayed
 :use_jdk
-echo Using JAVA_HOME:       %JAVA_HOME%
+echo Using JAVA_HOME:       "%JAVA_HOME%"
 :java_dir_displayed
-echo Using CLASSPATH:       %CLASSPATH%
+echo Using CLASSPATH:       "%CLASSPATH%"
 
 set _EXECJAVA=%_RUNJAVA%
 set MAINCLASS=org.apache.catalina.startup.Bootstrap
@@ -210,7 +210,7 @@
 if not ""%1"" == ""-security"" goto execCmd
 shift
 echo Using Security Manager
-set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
+set "SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy"
 goto execCmd
 
 :doRun
@@ -218,7 +218,7 @@
 if not ""%1"" == ""-security"" goto execCmd
 shift
 echo Using Security Manager
-set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
+set "SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy"
 goto execCmd
 
 :doStart
@@ -232,7 +232,7 @@
 if not ""%1"" == ""-security"" goto execCmd
 shift
 echo Using Security Manager
-set SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy
+set "SECURITY_POLICY_FILE=%CATALINA_BASE%\conf\catalina.policy"
 goto execCmd
 
 :doStop

Modified: tomcat/trunk/bin/digest.bat
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/digest.bat?rev=895392&r1=895391&r2=895392&view=diff
==============================================================================
--- tomcat/trunk/bin/digest.bat (original)
+++ tomcat/trunk/bin/digest.bat Sun Jan  3 14:02:31 2010
@@ -33,11 +33,11 @@
 goto end
 :okHome
 
-set EXECUTABLE=%CATALINA_HOME%\bin\tool-wrapper.bat
+set "EXECUTABLE=%CATALINA_HOME%\bin\tool-wrapper.bat"
 
 rem Check that target executable exists
 if exist "%EXECUTABLE%" goto okExec
-echo Cannot find %EXECUTABLE%
+echo Cannot find "%EXECUTABLE%"
 echo This file is needed to run this program
 goto end
 :okExec

Modified: tomcat/trunk/bin/service.bat
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/service.bat?rev=895392&r1=895391&r2=895392&view=diff
==============================================================================
--- tomcat/trunk/bin/service.bat (original)
+++ tomcat/trunk/bin/service.bat Sun Jan  3 14:02:31 2010
@@ -29,15 +29,15 @@
 rem $Id$
 rem ---------------------------------------------------------------------------
 
-set SELF=%~dp0%service.bat
+set "SELF=%~dp0%service.bat"
 rem Guess CATALINA_HOME if not defined
-set CURRENT_DIR=%cd%
+set "CURRENT_DIR=%cd%"
 if not "%CATALINA_HOME%" == "" goto gotHome
-set CATALINA_HOME=%cd%
+set "CATALINA_HOME=%cd%"
 if exist "%CATALINA_HOME%\bin\tomcat@VERSION_MAJOR@.exe" goto okHome
 rem CD to the upper dir
 cd ..
-set CATALINA_HOME=%cd%
+set "CATALINA_HOME=%cd%"
 :gotHome
 if exist "%CATALINA_HOME%\bin\tomcat@VERSION_MAJOR@.exe" goto okHome
 echo The tomcat.exe was not found...
@@ -51,10 +51,10 @@
 goto end
 :okHome
 if not "%CATALINA_BASE%" == "" goto gotBase
-set CATALINA_BASE=%CATALINA_HOME%
+set "CATALINA_BASE=%CATALINA_HOME%"
 :gotBase
 
-set EXECUTABLE=%CATALINA_HOME%\bin\tomcat@VERSION_MAJOR@.exe
+set "EXECUTABLE=%CATALINA_HOME%\bin\tomcat@VERSION_MAJOR@.exe"
 
 rem Set default Service name
 set SERVICE_NAME=Tomcat@VERSION_MAJOR@
@@ -102,26 +102,26 @@
 :doInstall
 rem Install the service
 echo Installing the service '%SERVICE_NAME%' ...
-echo Using CATALINA_HOME:    %CATALINA_HOME%
-echo Using CATALINA_BASE:    %CATALINA_BASE%
-echo Using JAVA_HOME:        %JAVA_HOME%
+echo Using CATALINA_HOME:    "%CATALINA_HOME%"
+echo Using CATALINA_BASE:    "%CATALINA_BASE%"
+echo Using JAVA_HOME:        "%JAVA_HOME%"
 
 rem Use the environment variables as an example
 rem Each command line option is prefixed with PR_
 
 set PR_DESCRIPTION=Apache Tomcat @VERSION@ Server - http://tomcat.apache.org/
-set PR_INSTALL=%EXECUTABLE%
-set PR_LOGPATH=%CATALINA_BASE%\logs
-set PR_CLASSPATH=%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_BASE%\bin\tomcat-juli.jar;%CATALINA_HOME%\bin\tomcat-juli.jar
+set "PR_INSTALL=%EXECUTABLE%"
+set "PR_LOGPATH=%CATALINA_BASE%\logs"
+set "PR_CLASSPATH=%CATALINA_HOME%\bin\bootstrap.jar;%CATALINA_BASE%\bin\tomcat-juli.jar;%CATALINA_HOME%\bin\tomcat-juli.jar"
 rem Set the server jvm from JAVA_HOME
-set PR_JVM=%JAVA_HOME%\jre\bin\server\jvm.dll
+set "PR_JVM=%JAVA_HOME%\jre\bin\server\jvm.dll"
 if exist "%PR_JVM%" goto foundJvm
 rem Set the client jvm from JAVA_HOME
-set PR_JVM=%JAVA_HOME%\jre\bin\client\jvm.dll
+set "PR_JVM=%JAVA_HOME%\jre\bin\client\jvm.dll"
 if exist "%PR_JVM%" goto foundJvm
 set PR_JVM=auto
 :foundJvm
-echo Using JVM:              %PR_JVM%
+echo Using JVM:              "%PR_JVM%"
 "%EXECUTABLE%" //IS//%SERVICE_NAME% --StartClass org.apache.catalina.startup.Bootstrap --StopClass
org.apache.catalina.startup.Bootstrap --StartParams start --StopParams stop
 if not errorlevel 1 goto installed
 echo Failed installing '%SERVICE_NAME%' service
@@ -137,7 +137,7 @@
 rem Set extra parameters
 "%EXECUTABLE%" //US//%SERVICE_NAME% --JvmOptions "-Dcatalina.base=%CATALINA_BASE%;-Dcatalina.home=%CATALINA_HOME%;-Djava.endorsed.dirs=%CATALINA_HOME%\endorsed"
--StartMode jvm --StopMode jvm
 rem More extra parameters
-set PR_LOGPATH=%CATALINA_BASE%\logs
+set "PR_LOGPATH=%CATALINA_BASE%\logs"
 set PR_STDOUTPUT=auto
 set PR_STDERROR=auto
 "%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties"
--JvmMs 128 --JvmMx 256

Modified: tomcat/trunk/bin/setclasspath.bat
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/setclasspath.bat?rev=895392&r1=895391&r2=895392&view=diff
==============================================================================
--- tomcat/trunk/bin/setclasspath.bat (original)
+++ tomcat/trunk/bin/setclasspath.bat Sun Jan  3 14:02:31 2010
@@ -40,7 +40,7 @@
 if not exist "%JAVA_HOME%\bin\jdb.exe" goto noJavaHome
 if not exist "%JAVA_HOME%\bin\javac.exe" goto noJavaHome
 if not "%JRE_HOME%" == "" goto okJavaHome
-set JRE_HOME=%JAVA_HOME%
+set "JRE_HOME=%JAVA_HOME%"
 goto okJavaHome
 
 :noJavaHome
@@ -64,7 +64,7 @@
 rem Don't override the endorsed dir if the user has set it previously
 if not "%JAVA_ENDORSED_DIRS%" == "" goto gotEndorseddir
 rem Set the default -Djava.endorsed.dirs argument
-set JAVA_ENDORSED_DIRS=%BASEDIR%\endorsed
+set "JAVA_ENDORSED_DIRS=%BASEDIR%\endorsed"
 :gotEndorseddir
 
 rem Set standard command for invoking Java.

Modified: tomcat/trunk/bin/shutdown.bat
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/shutdown.bat?rev=895392&r1=895391&r2=895392&view=diff
==============================================================================
--- tomcat/trunk/bin/shutdown.bat (original)
+++ tomcat/trunk/bin/shutdown.bat Sun Jan  3 14:02:31 2010
@@ -22,12 +22,12 @@
 rem ---------------------------------------------------------------------------
 
 rem Guess CATALINA_HOME if not defined
-set CURRENT_DIR=%cd%
+set "CURRENT_DIR=%cd%"
 if not "%CATALINA_HOME%" == "" goto gotHome
-set CATALINA_HOME=%CURRENT_DIR%
+set "CATALINA_HOME=%CURRENT_DIR%"
 if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
 cd ..
-set CATALINA_HOME=%cd%
+set "CATALINA_HOME=%cd%"
 cd "%CURRENT_DIR%"
 :gotHome
 if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
@@ -36,11 +36,11 @@
 goto end
 :okHome
 
-set EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat
+set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"
 
 rem Check that target executable exists
 if exist "%EXECUTABLE%" goto okExec
-echo Cannot find %EXECUTABLE%
+echo Cannot find "%EXECUTABLE%"
 echo This file is needed to run this program
 goto end
 :okExec

Modified: tomcat/trunk/bin/startup.bat
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/startup.bat?rev=895392&r1=895391&r2=895392&view=diff
==============================================================================
--- tomcat/trunk/bin/startup.bat (original)
+++ tomcat/trunk/bin/startup.bat Sun Jan  3 14:02:31 2010
@@ -22,12 +22,12 @@
 rem ---------------------------------------------------------------------------
 
 rem Guess CATALINA_HOME if not defined
-set CURRENT_DIR=%cd%
+set "CURRENT_DIR=%cd%"
 if not "%CATALINA_HOME%" == "" goto gotHome
-set CATALINA_HOME=%CURRENT_DIR%
+set "CATALINA_HOME=%CURRENT_DIR%"
 if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
 cd ..
-set CATALINA_HOME=%cd%
+set "CATALINA_HOME=%cd%"
 cd "%CURRENT_DIR%"
 :gotHome
 if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
@@ -36,11 +36,11 @@
 goto end
 :okHome
 
-set EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat
+set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"
 
 rem Check that target executable exists
 if exist "%EXECUTABLE%" goto okExec
-echo Cannot find %EXECUTABLE%
+echo Cannot find "%EXECUTABLE%"
 echo This file is needed to run this program
 goto end
 :okExec

Modified: tomcat/trunk/bin/tool-wrapper.bat
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/tool-wrapper.bat?rev=895392&r1=895391&r2=895392&view=diff
==============================================================================
--- tomcat/trunk/bin/tool-wrapper.bat (original)
+++ tomcat/trunk/bin/tool-wrapper.bat Sun Jan  3 14:02:31 2010
@@ -54,21 +54,21 @@
 
 rem Get standard Java environment variables
 if exist "%CATALINA_HOME%\bin\setclasspath.bat" goto okSetclasspath
-echo Cannot find %CATALINA_HOME%\bin\setclasspath.bat
+echo Cannot find "%CATALINA_HOME%\bin\setclasspath.bat"
 echo This file is needed to run this program
 goto end
 :okSetclasspath
-set BASEDIR=%CATALINA_HOME%
+set "BASEDIR=%CATALINA_HOME%"
 call "%CATALINA_HOME%\bin\setclasspath.bat"
 
 rem Add on extra jar files to CLASSPATH
 rem Note that there are no quotes as we do not want to introduce random
 rem quotes into the CLASSPATH
 if "%CLASSPATH%" == "" goto noclasspath
-set CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar;%BASEDIR%\lib\servlet-api.jar
+set "CLASSPATH=%CLASSPATH%;%CATALINA_HOME%\bin\bootstrap.jar;%BASEDIR%\lib\servlet-api.jar"
 goto okclasspath
 :noclasspath
-set CLASSPATH=%CATALINA_HOME%\bin\bootstrap.jar;%BASEDIR%\lib\servlet-api.jar
+set "CLASSPATH=%CATALINA_HOME%\bin\bootstrap.jar;%BASEDIR%\lib\servlet-api.jar"
 :okclasspath
 
 rem Get remaining unshifted command line arguments and save them in the

Modified: tomcat/trunk/bin/version.bat
URL: http://svn.apache.org/viewvc/tomcat/trunk/bin/version.bat?rev=895392&r1=895391&r2=895392&view=diff
==============================================================================
--- tomcat/trunk/bin/version.bat (original)
+++ tomcat/trunk/bin/version.bat Sun Jan  3 14:02:31 2010
@@ -22,12 +22,12 @@
 rem ---------------------------------------------------------------------------
 
 rem Guess CATALINA_HOME if not defined
-set CURRENT_DIR=%cd%
+set "CURRENT_DIR=%cd%"
 if not "%CATALINA_HOME%" == "" goto gotHome
-set CATALINA_HOME=%CURRENT_DIR%
+set "CATALINA_HOME=%CURRENT_DIR%"
 if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
 cd ..
-set CATALINA_HOME=%cd%
+set "CATALINA_HOME=%cd%"
 cd "%CURRENT_DIR%"
 :gotHome
 if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
@@ -36,11 +36,11 @@
 goto end
 :okHome
 
-set EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat
+set "EXECUTABLE=%CATALINA_HOME%\bin\catalina.bat"
 
 rem Check that target executable exists
 if exist "%EXECUTABLE%" goto okExec
-echo Cannot find %EXECUTABLE%
+echo Cannot find "%EXECUTABLE%"
 echo This file is needed to run this program
 goto end
 :okExec



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message