tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@locus.apache.org
Subject cvs commit: jakarta-tomcat/src/shell tomcat.bat tomcat.sh test-tomcat.bat test-tomcat.sh watchdog.sh
Date Thu, 24 Feb 2000 23:01:34 GMT
costin      00/02/24 15:01:34

  Modified:    .        build.xml
               src/build jakarta-apache.xml
               src/etc  server.xml
               src/share/org/apache/tomcat/core Context.java
               src/share/org/apache/tomcat/servlets DefaultErrorPage.java
               src/share/org/apache/tomcat/startup Tomcat.java
               src/shell tomcat.bat tomcat.sh
  Removed:     src/shell test-tomcat.bat test-tomcat.sh watchdog.sh
  Log:
  - Messages will go to logs/tomcat.log, where they belong
  
  - 3.1M2 will log almost all stack traces, you'll know that something is wrong
  even if you don't like it :-)
  
  - Changed tomcat.{sh,bat}: added -Dtomcat.home to all commands,
  added 2 new commands: ant and jspc.
  
  "tomcat ant " invoke ant in tomcat context ( tomcat classpath including
  tomcat-defined tasks, -Dtomcat.home ) - it is used to invoke tomcat-specific
  ant scripts ( like test-tomcat or watchdog )
  
  "tomcat jspc" is the same as "jspc" - we should avoid duplicating the setup
  code.
  
  TODO: make jspc call tomcat ( like start/stop ) - it's hard to keep all
  scripts in sync.
  
  XXX Should we deprecate/remove all scripts but tomcat.sh,bat ?
  I know some people are used to, but it's much easier to have a common
  "interface" ( tomcat.sh ).
  
  Revision  Changes    Path
  1.35      +0 -2      jakarta-tomcat/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/build.xml,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- build.xml	2000/02/24 20:24:55	1.34
  +++ build.xml	2000/02/24 23:01:23	1.35
  @@ -37,7 +37,6 @@
   
       <chmod perm="+x" src="${tomcat.build}/bin/tomcat.sh"/>
       <chmod perm="+x" src="${tomcat.build}/bin/jspc.sh"/>
  -    <chmod perm="+x" src="${tomcat.build}/bin/ant"/>
       <chmod perm="+x" src="${tomcat.build}/bin/startup.sh"/>
       <chmod perm="+x" src="${tomcat.build}/bin/shutdown.sh"/>
       <chmod perm="+x" src="${tomcat.build}/bin/test-tomcat.sh"/>
  @@ -144,7 +143,6 @@
       <!-- Change permissions for unix -->
       <chmod perm="+x" src="${tomcat.home}/bin/tomcat.sh"/>
       <chmod perm="+x" src="${tomcat.home}/bin/jspc.sh"/>
  -    <chmod perm="+x" src="${tomcat.home}/bin/ant"/>
       <chmod perm="+x" src="${tomcat.home}/bin/startup.sh"/>
       <chmod perm="+x" src="${tomcat.home}/bin/shutdown.sh"/>
       <chmod perm="+x" src="${tomcat.home}/bin/test-tomcat.sh"/>
  
  
  
  1.4       +9 -1      jakarta-tomcat/src/build/jakarta-apache.xml
  
  Index: jakarta-apache.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/build/jakarta-apache.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- jakarta-apache.xml	2000/02/24 18:20:46	1.3
  +++ jakarta-apache.xml	2000/02/24 23:01:24	1.4
  @@ -47,11 +47,19 @@
           <property name="package.name" value="xml-xerces" />
        </ant>    
     </target>
  +
  +  <!-- Remove the cvs tree, needs to be called daily - without it
  +       we will just get updates -->
  +  <target name="cvsclean" depends="init">
  +    <deltree dir="${ws.dir}/jakarta-tomcat" />
  +    <deltree dir="${ws.dir}/jakarta-ant" />
  +    <deltree dir="${ws.dir}/jakarta-tools" />
  +    <deltree dir="${ws.dir}/jakarta-watchdog" />
  +  </target>
     
     <!-- Customized target, needs to be called with parameters -->
     <!-- Parameters:  package.name -->
     <target name="package.snapshot" depends="init">
  -    <deltree dir="${ws.dir}/${package.name}/" />
       <deltree dir="${ws.dir}/${package.name}.src.zip" />
       <cvs cvsRoot="${cvs.root}" 
            package="${package.name}"   dest="${ws.dir}"  />
  
  
  
  1.12      +1 -0      jakarta-tomcat/src/etc/server.xml
  
  Index: server.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/etc/server.xml,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- server.xml	2000/02/24 20:24:55	1.11
  +++ server.xml	2000/02/24 23:01:25	1.12
  @@ -20,6 +20,7 @@
            -->
   
       <Logger name="tc_log" 
  +            path="logs/tomcat.log"
               customOutput="yes" />
   
       <Logger name="servlet_log" 
  
  
  
  1.62      +1 -1      jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java
  
  Index: Context.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java,v
  retrieving revision 1.61
  retrieving revision 1.62
  diff -u -r1.61 -r1.62
  --- Context.java	2000/02/22 21:44:28	1.61
  +++ Context.java	2000/02/24 23:01:27	1.62
  @@ -587,7 +587,7 @@
   	    }
   	}
   	if (csLog != null) {
  -	    csLog.log("<l:context path=\"" + path  + "\" >" + msg + "</l:context>");
  +	    csLog.log("<l:context path=\"" + path  + "\" >" + msg + "</l:context>\n");
   	} else {
   	    System.out.println("<l:context path=\"" + path  + "\" >" + msg + "</l:context>");
   	}
  
  
  
  1.7       +1 -1      jakarta-tomcat/src/share/org/apache/tomcat/servlets/DefaultErrorPage.java
  
  Index: DefaultErrorPage.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/servlets/DefaultErrorPage.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- DefaultErrorPage.java	2000/02/18 18:14:51	1.6
  +++ DefaultErrorPage.java	2000/02/24 23:01:28	1.7
  @@ -94,7 +94,7 @@
   
   	Throwable e= (Throwable)request.getAttribute("tomcat.servlet.error.throwable");
   	if( e!=null ) {
  -	    e.printStackTrace();
  +	    request.getContext().log( exceptionString(e));
   	    sendPrivateError(request, response, 500, exceptionString( e ));
   	    return;
   	}
  
  
  
  1.13      +1 -0      jakarta-tomcat/src/share/org/apache/tomcat/startup/Tomcat.java
  
  Index: Tomcat.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/startup/Tomcat.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- Tomcat.java	2000/02/22 22:53:25	1.12
  +++ Tomcat.java	2000/02/24 23:01:29	1.13
  @@ -114,6 +114,7 @@
       
       public static void main(String args[] ) {
   	try {
  +	    System.out.println("Starting tomcat. Check logs/tomcat.log for error messages ");
   	    Tomcat tomcat=new Tomcat();
   	    tomcat.execute( args );
   	} catch(Exception ex ) {
  
  
  
  1.11      +20 -7     jakarta-tomcat/src/shell/tomcat.bat
  
  Index: tomcat.bat
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.bat,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- tomcat.bat	2000/02/10 09:32:22	1.10
  +++ tomcat.bat	2000/02/24 23:01:32	1.11
  @@ -1,5 +1,5 @@
   @echo off
  -rem $Id: tomcat.bat,v 1.10 2000/02/10 09:32:22 rubys Exp $
  +rem $Id: tomcat.bat,v 1.11 2000/02/24 23:01:32 costin Exp $
   rem A batch file to start/stop tomcat server.
   
   rem This batch file written and tested under Windows NT
  @@ -27,6 +27,8 @@
   if "%1" == "stop" goto stopServer
   if "%1" == "run" goto runServer
   if "%1" == "env" goto setupEnv
  +if "%1" == "ant" goto runAnt
  +if "%1" == "jspc" goto runJspc
   
   echo Usage:
   echo tomcat (start^|run^|env^|stop)
  @@ -34,28 +36,39 @@
   echo         run   - start tomcat in the current window
   echo         env   - setup the environment for tomcat
   echo         stop  - stop tomcat
  +echo         ant   - run ant with tomcat context
  +echo         jspc  - run jsp pre compiler
   goto cleanup
   
   :startServer
   echo Starting tomcat in new window
   echo Using classpath: %CLASSPATH%
  -rem start java org.apache.tomcat.shell.Startup %2 %3 %4 %5 %6 %7 %8 %9
  -start java org.apache.tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9
  +start -Dtomcat.home=%TOMCAT_HOME% java 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%
  -rem java org.apache.tomcat.shell.Startup %2 %3 %4 %5 %6 %7 %8 %9
  -java org.apache.tomcat.startup.Tomcat %2 %3 %4 %5 %6 %7 %8 %9
  +java -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%
  -rem java org.apache.tomcat.shell.Shutdown %2 %3 %4 %5 %6 %7 %8 %9
  -java org.apache.tomcat.startup.Tomcat -stop %2 %3 %4 %5 %6 %7 %8 %9
  +java -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=%TOMACT_HOME%  -Dtomcat.home=%TOMCAT_HOME% org.apache.tools.ant.Main $@
  +goto cleanup
  +
  +:runJspc
  +rem Run ant
  +echo Using classpath: %CLASSPATH%
  +java -Dtomcat.home=%TOMCAT_HOME% org.apache.jasper.JspC $@
   goto cleanup
   
   :setupEnv
  
  
  
  1.12      +18 -6     jakarta-tomcat/src/shell/tomcat.sh
  
  Index: tomcat.sh
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/shell/tomcat.sh,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- tomcat.sh	2000/02/13 20:49:45	1.11
  +++ tomcat.sh	2000/02/24 23:01:32	1.12
  @@ -1,6 +1,6 @@
   #!/bin/sh
   #
  -# $Id: tomcat.sh,v 1.11 2000/02/13 20:49:45 costin Exp $
  +# $Id: tomcat.sh,v 1.12 2000/02/24 23:01:32 costin Exp $
   
   # Shell script to start and stop the server
   
  @@ -98,35 +98,47 @@
   if [ "$1" = "start" ] ; then 
     shift 
     echo Using classpath: ${CLASSPATH}
  -  $JAVACMD org.apache.tomcat.startup.Tomcat "$@" &
  +  $JAVACMD  -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 org.apache.tomcat.startup.Tomcat -stop "$@"
  +  $JAVACMD  -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 org.apache.tomcat.startup.Tomcat "$@" 
  +  $JAVACMD  -Dtomcat.home=${TOMCAT_HOME} org.apache.tomcat.startup.Tomcat "$@" 
   #  $JAVACMD org.apache.tomcat.shell.Startup "$@" 
     # no &
   
  -## Call it with source tomcat.sh to set the env for tomcat
  +elif [ "$1" = "ant" ] ; then 
  +  shift 
  +
  +  $JAVACMD -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 "$@"
  +
   elif [ "$1" = "env" ] ; then 
  +  ## Call it with source tomcat.sh to set the env for tomcat
     shift 
     echo Setting classpath to: ${CLASSPATH}
     oldCP=$CLASSPATH
   
   else
     echo "Usage:"
  -  echo "tomcat (start|env|run|stop)"
  +  echo "tomcat (start|env|run|stop|ant)"
     echo "        start - start tomcat in the background"
     echo "        run   - start tomcat in the foreground"
     echo "        stop  - stop tomcat"
     echo "        env  -  set CLASSPATH and TOMCAT_HOME env. variables"
  +  echo "        ant  - run ant script in tomcat context ( classes, directories, etc)"
  +  echo "        jspc - run jsp pre compiler"
   
     exit 0
   fi
  
  
  

Mime
View raw message