tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@locus.apache.org
Subject cvs commit: jakarta-tomcat/src/shell tomcat.bat tomcat.sh
Date Fri, 31 Mar 2000 20:31:34 GMT
craigmcc    00/03/31 12:31:32

  Modified:    src/shell tomcat.bat tomcat.sh
  Log:
  Support the passing of arguments to the "java" runtime when executing
  tomcat.sh or tomcat.bat, as follows:
  
      TOMCAT_OPTS - passed to "java" on a start, stop, or run command
      ANT_OPTS - passed to "java" on an ant command
      JSPC_OPTS - passed to "java" on a jspc command
  
  If these environment variables are not defined, they default to passing
  nothing (i.e. the current behavior).  Now you can customize the Java
  environment within which Tomcat runs, without having to hack the tomcat.bat/sh
  script yourself.
  
  PR:137
  Submitted by:	nacho@siapi.es
  
  Revision  Changes    Path
  1.18      +5 -5      jakarta-tomcat/src/shell/tomcat.bat
  
  Index: tomcat.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.bat,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- tomcat.bat	2000/03/31 18:45:08	1.17
  +++ tomcat.bat	2000/03/31 20:31:31	1.18
  @@ -58,32 +58,32 @@
   :startServer
   echo Starting tomcat in new window
   echo Using classpath: %CLASSPATH%
  -start java -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat %2 %3 %4 %5 %6
%7 %8 %9
  +start java %TOMCAT_OPTS% -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat
%2 %3 %4 %5 %6 %7 %8 %9
   goto cleanup
   
   :runServer
   rem Start the Tomcat Server
   echo Using classpath: %CLASSPATH%
  -java -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8
%9
  +java %TOMCAT_OPTS% -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat %2 %3
%4 %5 %6 %7 %8 %9
   goto cleanup
   
   :stopServer
   rem Stop the Tomcat Server
   echo Using classpath: %CLASSPATH%
  -java -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat -stop %2 %3 %4 %5 %6
%7 %8 %9
  +java %TOMCAT_OPTS% -Dtomcat.home="%TOMCAT_HOME%" org.apache.tomcat.startup.Tomcat -stop
%2 %3 %4 %5 %6 %7 %8 %9
   goto cleanup
   goto cleanup
   
   :runAnt
   rem Run ant
   echo Using classpath: %CLASSPATH%
  -java -Dant.home="%TOMCAT_HOME%" -Dtomcat.home="%TOMCAT_HOME%" org.apache.tools.ant.Main
%2 %3 %4 %5 %6 %7 %8 %9
  +java %ANT_OPTS -Dant.home="%TOMCAT_HOME%" -Dtomcat.home="%TOMCAT_HOME%" org.apache.tools.ant.Main
%2 %3 %4 %5 %6 %7 %8 %9
   goto cleanup
   
   :runJspc
   rem Run ant
   echo Using classpath: %CLASSPATH%
  -java -Dtomcat.home="%TOMCAT_HOME%" org.apache.jasper.JspC %2 %3 %4 %5 %6 %7 %8 %9
  +java %JSPC_OPTS% -Dtomcat.home="%TOMCAT_HOME%" org.apache.jasper.JspC %2 %3 %4 %5 %6 %7
%8 %9
   goto cleanup
   
   :setupEnv
  
  
  
  1.16      +17 -6     jakarta-tomcat/src/shell/tomcat.sh
  
  Index: tomcat.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.sh,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- tomcat.sh	2000/03/16 20:43:26	1.15
  +++ tomcat.sh	2000/03/31 20:31:31	1.16
  @@ -1,6 +1,6 @@
   #!/bin/sh
   #
  -# $Id: tomcat.sh,v 1.15 2000/03/16 20:43:26 costin Exp $
  +# $Id: tomcat.sh,v 1.16 2000/03/31 20:31:31 craigmcc Exp $
   
   # Shell script to start and stop the server
   
  @@ -60,6 +60,17 @@
       exit 1
   fi
   
  +if [ "$TOMCAT_OPTS" = "" ] ; then
  +  TOMCAT_OPTS=""
  +fi
  +
  +if [ "$ANT_OPTS" = "" ] ; then
  +  ANT_OPTS=""
  +fi
  +
  +if [ "$JSPC_OPTS" = "" ] ; then
  +  JSPC_OPTS=""
  +fi
   
   if [ -z "$JAVA_HOME" ] ;  then
     JAVA=`which java`
  @@ -107,31 +118,31 @@
   if [ "$1" = "start" ] ; then 
     shift 
     echo Using classpath: ${CLASSPATH}
  -  $JAVACMD  -Dtomcat.home=${TOMCAT_HOME}  org.apache.tomcat.startup.Tomcat "$@" &
  +  $JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME}  org.apache.tomcat.startup.Tomcat
"$@" &
   #   $JAVACMD org.apache.tomcat.shell.Startup "$@" &
   
   elif [ "$1" = "stop" ] ; then 
     shift 
     echo Using classpath: ${CLASSPATH}
  -  $JAVACMD  -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat -stop "$@"
  +  $JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat -stop
"$@"
   #   $JAVACMD org.apache.tomcat.shell.Shutdown "$@"
   
   elif [ "$1" = "run" ] ; then 
     shift 
     echo Using classpath: ${CLASSPATH}
  -  $JAVACMD  -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat "$@" 
  +  $JAVACMD $TOMCAT_OPTS -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat "$@"

   #  $JAVACMD org.apache.tomcat.shell.Startup "$@" 
     # no &
   
   elif [ "$1" = "ant" ] ; then 
     shift 
   
  -  $JAVACMD -Dant.home=${TOMCAT_HOME} -Dtomcat.home=${TOMCAT_HOME} org.apache.tools.ant.Main
$@
  +  $JAVACMD $ANT_OPTS -Dant.home=${TOMCAT_HOME} -Dtomcat.home=${TOMCAT_HOME} org.apache.tools.ant.Main
$@
   
   elif [ "$1" = "jspc" ] ; then 
     shift 
   
  -  $JAVACMD -Dtomcat.home=${TOMCAT_HOME} org.apache.jasper.JspC "$@"
  +  $JAVACMD $JSPC_OPTS -Dtomcat.home=${TOMCAT_HOME} org.apache.jasper.JspC "$@"
   
   elif [ "$1" = "env" ] ; then 
     ## Call it with source tomcat.sh to set the env for tomcat
  
  
  

Mime
View raw message