larryi 01/08/30 20:54:50
Modified: src/shell tomcat.bat
Log:
Fix "Usage"display for Win9x.
Remove -security option in favor of using "sandbox". For start and run,
always set java.security.policy so "sandbox" can be any argument. This
make it consistent with tomcat.sh. If the second argument after "start" is
"sandbox" or "-sandbox', still display a message and set a title if NT or W2k.
Revision Changes Path
1.41 +8 -12 jakarta-tomcat/src/shell/tomcat.bat
Index: tomcat.bat
===================================================================
RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.bat,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -r1.40 -r1.41
--- tomcat.bat 2001/08/30 15:15:15 1.40
+++ tomcat.bat 2001/08/31 03:54:50 1.41
@@ -29,7 +29,7 @@
rem Tomcat, refer to the Tomcat Users Guide (tomcat_ug.html found
rem in the "doc" directory.
rem
-rem $Id: tomcat.bat,v 1.40 2001/08/30 15:15:15 larryi Exp $
+rem $Id: tomcat.bat,v 1.41 2001/08/31 03:54:50 larryi Exp $
rem -------------------------------------------------------------------------
@@ -107,7 +107,7 @@
if "%1" == "estart" goto estart
:doUsage
-echo Usage: tomcat ( env ^| jspc ^| run ^| start ^| stop )
+echo "Usage: tomcat ( enableAdmin | env | estart | jspc | run | start | stop )"
echo Commands:
echo enableAdmin - Trust the admin web application,
echo i.e. rewrites conf/apps-admin.xml with trusted="true"
@@ -122,13 +122,15 @@
:startServer
echo Starting Tomcat in new window
-if "%2" == "-security" goto startSecure
-%_STARTJAVA% %TOMCAT_OPTS% -Dtomcat.home=%TOMCAT_HOME% %_MAIN% start %2 %3 %4 %5 %6
%7 %8 %9
+if "%2" == "sandbox" goto startSecure
+if "%2" == "-sandbox" goto startSecure
+rem Note: Specify tomcat.policy in case -sandbox isn't the second argument
+%_STARTJAVA% %TOMCAT_OPTS%
-Djava.security.policy=="%TOMCAT_HOME%/conf/tomcat.policy" -Dtomcat.home=%TOMCAT_HOME%
%_MAIN% start %2 %3 %4 %5 %6 %7 %8 %9
goto cleanup
:startSecure
echo Starting Tomcat with a SecurityManager
-%_SECSTARTJAVA% %TOMCAT_OPTS%
-Djava.security.policy=="%TOMCAT_HOME%/conf/tomcat.policy" -Dtomcat.home=%TOMCAT_HOME%
%_MAIN% start -sandbox %3 %4 %5 %6 %7 %8 %9
+%_SECSTARTJAVA% %TOMCAT_OPTS%
-Djava.security.policy=="%TOMCAT_HOME%/conf/tomcat.policy" -Dtomcat.home=%TOMCAT_HOME%
%_MAIN% start %2 %3 %4 %5 %6 %7 %8 %9
goto cleanup
:runServer
@@ -136,13 +138,7 @@
if "%2" == "enableAdmin" goto oldEnbAdmin
if "%2" == "-enableAdmin" goto oldEnbAdmin
rem Running Tomcat in this window
-if "%2" == "-security" goto runSecure
-%_RUNJAVA% %TOMCAT_OPTS% -Dtomcat.home=%TOMCAT_HOME% %_MAIN% start %2 %3 %4 %5 %6
%7 %8 %9
-goto cleanup
-
-:runSecure
-rem Running Tomcat with a SecurityManager
-%_RUNJAVA% %TOMCAT_OPTS% -Djava.security.policy=="%TOMCAT_HOME%/conf/tomcat.policy"
-Dtomcat.home=%TOMCAT_HOME% %_MAIN% start -sandbox %3 %4 %5 %6 %7 %8 %9
+%_RUNJAVA% %TOMCAT_OPTS% -Djava.security.policy=="%TOMCAT_HOME%/conf/tomcat.policy"
-Dtomcat.home=%TOMCAT_HOME% %_MAIN% start %2 %3 %4 %5 %6 %7 %8 %9
goto cleanup
:enableAdmin