cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup Tomcat.java

2001-06-08 Thread costin

costin  01/06/08 20:36:42

  Modified:src/share/org/apache/tomcat/startup Tomcat.java
  Log:
  Few more comments.
  
  Delegate everything that is related with starting tomcat to EmbededTomcat,
  which is the real starter ( Tomcat is in fact embeding tomcat, it's
  just a simple starter that can invoke several actions - start, stop,
  enableAdmin, etc )
  
  Revision  ChangesPath
  1.61  +79 -43jakarta-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.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- Tomcat.java   2001/03/25 21:53:16 1.60
  +++ Tomcat.java   2001/06/09 03:36:42 1.61
  @@ -16,9 +16,16 @@
   import org.apache.tomcat.util.collections.*;
   
   /**
  - * Starter for Tomcat using XML.
  - * Based on Ant.
  - *
  + * Main entry point to several Tomcat functions. Uses EmbededTomcat to
  + * start and init tomcat, and special functiosn to stop, configure, etc.
  + * 
  + * It is intended as a replacement for the shell command - EmbededTomcat
  + * is the real tomcat-specific object that deals with tomcat internals,
  + * this is just a wrapper.
  + * 
  + * It can be used in association with Main.java - in order to set the
  + * CLASSPATH.
  + * 
* @author [EMAIL PROTECTED]
*/
   public class Tomcat {
  @@ -28,14 +35,16 @@
   
   private String action=start;
   
  +EmbededTomcat tomcat=new EmbededTomcat();
  +
   String home=null;
  -String install=null;
  -String args[];
  -ClassLoader parentClassLoader;
  -boolean sandbox=false;
   
  +String args[];
  +
   // null means user didn't set one
   String configFile=null;
  +boolean fastStart=false;
  +
   // relative to TOMCAT_HOME
   static final String DEFAULT_CONFIG=conf/server.xml;
   SimpleHashtable attributes=new SimpleHashtable();
  @@ -47,10 +56,11 @@
   
   public void setHome(String home) {
this.home=home;
  + tomcat.setHome( home );
   }
   
   public void setInstall(String install) {
  - this.install=install;
  + tomcat.setInstall(install);
   }
   
   public void setArgs(String args[]) {
  @@ -63,12 +73,25 @@
   }
   
   public void setSandbox( boolean b ) {
  - sandbox=b;
  + tomcat.setSandbox( b );
   }
   
   public void setParentClassLoader( ClassLoader cl ) {
  - parentClassLoader=cl;
  + tomcat.setParentClassLoader(cl);
   }
  +
  +public void setCommonClassLoader( ClassLoader cl ) {
  + tomcat.setCommonClassLoader( cl );
  +}
  +
  +public void setAppsClassLoader( ClassLoader cl ) {
  + tomcat.setAppsClassLoader( cl );
  +}
  +
  +public void setContainerClassLoader( ClassLoader cl ) {
  + tomcat.setContainerClassLoader( cl );
  +}
  +
   //  main/execute 
   
   public static void main(String args[] ) {
  @@ -88,13 +111,13 @@
setAction(help);
}
if( stop.equals( action )){
  - stop();
  + stopTomcat();
} else if( enableAdmin.equals( action )){
enableAdmin();
} else if( help.equals( action )) {
printUsage();
} else if( start.equals( action )) {
  - start();
  + startTomcat();
}
   }
   
  @@ -118,7 +141,7 @@
pw.close();
   }

  -public void stop() throws Exception {
  +public void stopTomcat() throws TomcatException {
System.out.println(sm.getString(tomcat.stop));
try {
StopTomcat task=
  @@ -126,36 +149,43 @@
   
task.execute(); 
}
  - catch (TomcatException te) {
  - if (te.getRootCause() instanceof java.net.ConnectException)
  - System.out.println(sm.getString(tomcat.connectexception));
  - else
  - throw te;
  + catch (Exception te) {
  + if( te instanceof TomcatException ) {
  + if (((TomcatException)te).getRootCause() instanceof 
java.net.ConnectException)
  + System.out.println(sm.getString(tomcat.connectexception));
  + else
  + throw (TomcatException)te;
  + } else
  + throw new TomcatException( te );
}
return;
   }
   
  -public void start() throws Exception {
  - EmbededTomcat tcat=new EmbededTomcat();
  -
  - PathSetter pS=new PathSetter();
  - tcat.addInterceptor( pS );
  +public void startTomcat() throws TomcatException {
  + if( tomcat==null ) tomcat=new EmbededTomcat();

  - ServerXmlReader sxmlConf=new ServerXmlReader();
  - sxmlConf.setConfig( configFile );
  - tcat.addInterceptor( sxmlConf );
  -ClassLoader 

cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup Tomcat.java

2001-03-01 Thread costin

costin  01/03/01 20:49:36

  Modified:src/share/org/apache/tomcat/core Context.java
   src/share/org/apache/tomcat/modules/config ApacheConfig.java
IISConfig.java LogSetter.java NSConfig.java
PolicyInterceptor.java
   src/share/org/apache/tomcat/modules/generators
ErrorHandler.java
   src/share/org/apache/tomcat/modules/server Ajp12.java
Ajp13Interceptor.java Http10.java
Http10Interceptor.java
   src/share/org/apache/tomcat/modules/session
SimpleSessionStore.java
   src/share/org/apache/tomcat/startup Tomcat.java
  Log:
  Stop using Logger or the the Log constructor.
  
  Revision  ChangesPath
  1.141 +2 -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.140
  retrieving revision 1.141
  diff -u -r1.140 -r1.141
  --- Context.java  2001/02/27 16:54:01 1.140
  +++ Context.java  2001/03/02 04:49:06 1.141
  @@ -583,7 +583,8 @@
if( "/".equals(path) )
path="";
this.path = path;
  - loghelper.setLogPrefix("Ctx("+ getId() +") ");
  + loghelper=Log.getLog("org/apache/tomcat/core",
  +  "Ctx("+ getId() +") ");
   }
   
   /**
  
  
  
  1.6   +1 -1  
jakarta-tomcat/src/share/org/apache/tomcat/modules/config/ApacheConfig.java
  
  Index: ApacheConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/ApacheConfig.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- ApacheConfig.java 2001/02/20 03:16:51 1.5
  +++ ApacheConfig.java 2001/03/02 04:49:11 1.6
  @@ -119,7 +119,7 @@
   
   
   
  -Log loghelper = new Log("tc_log", this);
  +Log loghelper = Log.getLog("tc_log", this);
   
   public void execute(ContextManager cm) throws TomcatException {
try {
  
  
  
  1.3   +1 -1  
jakarta-tomcat/src/share/org/apache/tomcat/modules/config/IISConfig.java
  
  Index: IISConfig.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/IISConfig.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- IISConfig.java2001/02/13 04:30:16 1.2
  +++ IISConfig.java2001/03/02 04:49:12 1.3
  @@ -78,7 +78,7 @@
   public static final String JK_LOG_LOCATION = "/logs/iis_redirect.log";
   public static final String IIS_REG_FILE = "/conf/jk/iis_redirect.reg";
   
  -Log loghelper = new Log("tc_log", "IISConfig");
  +Log loghelper = Log.getLog("tc_log", "IISConfig");
   
   public IISConfig() 
   {
  
  
  
  1.9   +22 -3 
jakarta-tomcat/src/share/org/apache/tomcat/modules/config/LogSetter.java
  
  Index: LogSetter.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/LogSetter.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- LogSetter.java2001/02/20 03:16:51 1.8
  +++ LogSetter.java2001/03/02 04:49:13 1.9
  @@ -61,6 +61,7 @@
   
   import org.apache.tomcat.core.*;
   import org.apache.tomcat.util.log.*;
  +import org.apache.tomcat.util.qlog.*;
   import org.apache.tomcat.util.io.FileUtil;
   import java.io.*;
   import java.net.*;
  @@ -192,6 +193,15 @@
   {
if( module!=this ) return;
   
  + LogManager logManager=(LogManager)cm.getNote("tc.LogManager");
  + 
  + // Log will redirect all Log.getLog to us
  + if( logManager==null ) {
  + logManager=new TomcatLogManager();
  + cm.setNote("tc.LogManager", logManager);
  + Log.setLogManager( logManager );
  + }
  + 
if( name==null ) {
if( servletLogger )
name="org/apache/tomcat/facade";
  @@ -220,7 +230,6 @@

// construct a queue logger
QueueLogger ql=new QueueLogger();
  - ql.setName(name);
if( ! timestamps )
ql.setTimestamp( "false" );
if( tsFormat!=null )
  @@ -233,7 +242,7 @@
   
ql.open();
   
  - Logger.putLogger( ql );
  + logManager.addChannel( name, ql );
   
if( "org/apache/tomcat/core".equals( name ) ) {
// this will be the Log interface to the log we just created
  @@ -252,8 +261,18 @@
   
   }
   
  +/** Adapter and registry for QueueLoggers
  + */
  +static class TomcatLogManager extends LogManager {
   
  -// XXX Flush the buffers on shutdown 

cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup Tomcat.java

2001-02-11 Thread costin

costin  01/02/11 19:26:38

  Modified:src/share/org/apache/tomcat/startup Tomcat.java
  Log:
  Added the "sandbox" option - otherwise it's hard to start tomcat
  with security manager if java -jar is used to start.
  
  After M1 I'll propose the change of the scripts, there are quite a few problems
  with sandboxing and the TOMCAT_HOME guessing on unix.
  
  Revision  ChangesPath
  1.56  +11 -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.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- Tomcat.java   2001/02/10 19:17:28 1.55
  +++ Tomcat.java   2001/02/12 03:26:38 1.56
  @@ -31,6 +31,7 @@
   String home=null;
   String args[];
   ClassLoader parentClassLoader;
  +boolean sandbox=false;
   
   // null means user didn't set one
   String configFile=null;
  @@ -56,6 +57,10 @@
action=s;
   }
   
  +public void setSandbox( boolean b ) {
  + sandbox=b;
  +}
  +
   public void setParentClassLoader( ClassLoader cl ) {
parentClassLoader=cl;
   }
  @@ -140,6 +145,8 @@
   if (cl==null) cl=this.getClass().getClassLoader();
   
   tcat.getContextManager().setParentLoader(cl);
  + if( sandbox )
  + tcat.getContextManager().setProperty( "sandbox", "true");
tcat.initContextManager();
   
tcat.start();
  @@ -169,6 +176,10 @@
return false;
} else if (arg.equals("-stop")) {
action="stop";
  + } else if (arg.equals("-sandbox")) {
  + sandbox=true;
  + } else if (arg.equals("-security")) {
  + sandbox=true;
} else if (arg.equals("-enableAdmin")) {
action="enableAdmin";
} else if (arg.equals("-g") || arg.equals("-generateConfigs")) {
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup Tomcat.java

2001-02-10 Thread nacho

nacho   01/02/10 08:38:17

  Modified:src/share/org/apache/tomcat/startup Tomcat.java
  Log:
  Cleaning a last System.out.println
  
  Revision  ChangesPath
  1.53  +1 -1  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.52
  retrieving revision 1.53
  diff -u -r1.52 -r1.53
  --- Tomcat.java   2001/02/09 07:49:47 1.52
  +++ Tomcat.java   2001/02/10 16:38:16 1.53
  @@ -149,7 +149,7 @@
   
   public void setAttribute(String s,Object o) {
   attributes.put(s,o);
  -System.out.println(s+":"+o);
  +//System.out.println(s+":"+o);
   }
   public void executeWithAttributes() throws Exception {
  String[] args=(String[])attributes.get("args");
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup Tomcat.java

2001-02-08 Thread costin

costin  01/02/08 23:49:47

  Modified:src/share/org/apache/tomcat/startup Tomcat.java
  Log:
  Removing println
  
  Revision  ChangesPath
  1.52  +3 -3  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.51
  retrieving revision 1.52
  diff -u -r1.51 -r1.52
  --- Tomcat.java   2001/02/06 02:46:28 1.51
  +++ Tomcat.java   2001/02/09 07:49:47 1.52
  @@ -76,10 +76,10 @@
sxmlConf.setConfig( configFile );
tcat.addInterceptor( sxmlConf );
   ClassLoader cl=(ClassLoader)attributes.get("parentClassLoader");
  -System.out.println("parentClassLoader:"+cl);
  -System.out.println("thisClassLoader:"+this.getClass().getClassLoader());
  +//System.out.println("parentClassLoader:"+cl);
  +//System.out.println("thisClassLoader:"+this.getClass().getClassLoader());
   if (cl==null) cl=this.getClass().getClassLoader();
  -System.out.println("parentClassLoader:"+cl);
  +//System.out.println("parentClassLoader:"+cl);
   tcat.getContextManager().setParentLoader(cl);
tcat.initContextManager();
   
  
  
  

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]




cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup Tomcat.java

2000-12-29 Thread costin

costin  00/12/29 13:24:35

  Modified:src/facade22/org/apache/tomcat/facade
HttpServletRequestFacade.java
   src/share/org/apache/tomcat/helper RequestUtil.java
   src/share/org/apache/tomcat/modules/config
ServerXmlInterceptor.java WebAppsConfig.java
   src/share/org/apache/tomcat/request StaticInterceptor.java
   src/share/org/apache/tomcat/startup Tomcat.java
  Removed: src/share/org/apache/tomcat/helper ServerXmlHelper.java
  Log:
  Minor fixes ( including the build :-), preparing to finish RequestUtil
  ( the last "intermediary" class - neither core nor util nor module ).
  
  After that is done, tomcat 3.3 will consist of only 3 components:
  
  - the "core" - 9 classes ( including TomcatException ): basic representation
  for request, response, location, application, server, module.
  
  - modules ( tomcat/context and tomcat/request modules will be moved to
  tomcat/modules and organized by type, again as in Apache 2.0 ). ( about 30
  modules so far - probably 20 are important )
  
  - utilities ( similar with APR - more work is needed to optimize and improve
  the documentation, but that's a different story, not tomcat3.3 )
  
  ( the servlet2.2 is a particular module/group of modules ).
  
  ( One more step would be to remove/move out all non-essential modules
  ( i.e. "features" that are not required for normal operation ) - but I don't
  like removing existing features, probably we can leave them in.)
  
  Remaining items for this year: Parameters, Sessions, maybe Encoding (
  making it a module - the rest can be done independently ).
  
  Revision  ChangesPath
  1.14  +1 -1  
jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletRequestFacade.java
  
  Index: HttpServletRequestFacade.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletRequestFacade.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- HttpServletRequestFacade.java 2000/12/26 22:58:50 1.13
  +++ HttpServletRequestFacade.java 2000/12/29 21:24:32 1.14
  @@ -360,7 +360,7 @@
   /** Delegate to RequestUtil
*/
   public Enumeration getLocales() {
  -return RequestUtil.getLocales(request);
  +return RequestUtil.getLocales(request.getMimeHeaders());
   }
   
   /** Delegate to Context
  
  
  
  1.7   +8 -7  
jakarta-tomcat/src/share/org/apache/tomcat/helper/RequestUtil.java
  
  Index: RequestUtil.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/helper/RequestUtil.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RequestUtil.java  2000/11/30 04:58:43 1.6
  +++ RequestUtil.java  2000/12/29 21:24:33 1.7
  @@ -59,8 +59,9 @@
   
   package org.apache.tomcat.helper;
   
  -import org.apache.tomcat.core.*;
  +import org.apache.tomcat.core.Request;
   import org.apache.tomcat.util.*;
  +
   import java.io.*;
   import java.net.*;
   import java.util.*;
  @@ -272,8 +273,8 @@
   
   
   
  -public static Locale getLocale(Request req) {
  - String acceptLanguage = req.getHeader("Accept-Language");
  +public static Locale getLocale(MimeHeaders headers) {
  + String acceptLanguage = headers.getHeader("Accept-Language");
if( acceptLanguage == null ) return Locale.getDefault();
   
   Hashtable languages = new Hashtable();
  @@ -288,8 +289,8 @@
   return (Locale)l.elementAt(0);
   }
   
  -public static Enumeration getLocales(Request req) {
  - String acceptLanguage = req.getHeader("Accept-Language");
  +public static Enumeration getLocales(MimeHeaders headers) {
  + String acceptLanguage = headers.getHeader("Accept-Language");
// Short circuit with an empty enumeration if null header
   if (acceptLanguage == null) {
   Vector v = new Vector();
  @@ -551,7 +552,7 @@
   }
   
   
  -public static int readBody(Request req, byte body[], int len)
  +private static int readBody(Request req, byte body[], int len)
throws IOException
   {
int offset = 0;
  @@ -566,7 +567,7 @@
return len;
   }
   
  -public static int readData(InputStream in, byte buf[], int length) {
  +private static int readData(InputStream in, byte buf[], int length) {
   int read = 0;
   try {
   do {
  
  
  
  1.4   +5 -4  
jakarta-tomcat/src/share/org/apache/tomcat/modules/config/ServerXmlInterceptor.java
  
  Index: ServerXmlInterceptor.java
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/ServerXmlInterceptor.java,v
  

cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup Tomcat.java

2000-11-29 Thread costin

costin  00/11/29 23:51:44

  Modified:src/native/mod_jk/apache1.3 Makefile.linux
   src/share/org/apache/tomcat/resources
LocalStrings.properties
   src/share/org/apache/tomcat/startup Tomcat.java
  Log:
  Merge few more changes from 3.2.
  
  - change in Makefile.linux ( support external APXS definition )
  - better comments on startup
  
  ( read the original commit log for more details )
  Regarding startup - 3.3 will have a new ( and better !) startup mechanism,
  that will remove the need for shell scripts, classpath, etc. Tomcat.java
  can still be used and we keep it as a backup, in case we can't finish the
  refactoring in time.
  
  Submitted by: Paul Frieden [EMAIL PROTECTED]
  PR: BugRat Bug Report #429
  Submitted by: Ralf Suckow [EMAIL PROTECTED]
  
  Revision  ChangesPath
  1.3   +2 -0  jakarta-tomcat/src/native/mod_jk/apache1.3/Makefile.linux
  
  Index: Makefile.linux
  ===
  RCS file: /home/cvs/jakarta-tomcat/src/native/mod_jk/apache1.3/Makefile.linux,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Makefile.linux2000/11/10 18:48:50 1.2
  +++ Makefile.linux2000/11/30 07:51:43 1.3
  @@ -6,7 +6,9 @@
   
   JAVA_INCL=-I ${JAVA_HOME}/include -I ${JAVA_HOME}/include/${OS}
   JAVA_LIB=-L ${JAVA_HOME}/jre/lib/${ARCH} -L ${JAVA_HOME}/lib/${ARCH}/native_threads
  +#ifndef APXS
   APXS=/usr/sbin/apxs
  +#endif
   
   JK=../common/
   SRCS=${JK}/jk_ajp12_worker.c ${JK}/jk_connect.c ${JK}/jk_msg_buff.c ${JK}/jk_util.c 
${JK}/jk_ajp13.c \
  
  
  
  1.11  +3 -3  
jakarta-tomcat/src/share/org/apache/tomcat/resources/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===
  RCS file: 
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/resources/LocalStrings.properties,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- LocalStrings.properties   2000/11/06 15:11:07 1.10
  +++ LocalStrings.properties   2000/11/30 07:51:43 1.11
  @@ -1,4 +1,4 @@
  -# $Id: LocalStrings.properties,v 1.10 2000/11/06 15:11:07 nacho Exp $
  +# $Id: LocalStrings.properties,v 1.11 2000/11/30 07:51:43 costin Exp $
   #
   
   # Localized strings for package org.apache.tomcat.core
  @@ -21,14 +21,14 @@
   defaulterrorpage.internalservleterror=Internal Servlet Error:
   
   #Tomcat.java
  -tomcat.usage=usage: 
  +tomcat.usage=Usage: java org.apache.tomcat.startup.Tomcat options
   tomcat.start=Tomcat started. Check {0} for error and log messages.
   tomcat.loading=Loading config file
   tomcat.loaded=Loaded config file
   tomcat.bindexception=Another service is using the requested port (possibly another 
instance of Tomcat). Please stop the other service and try again.
   tomcat.fatalconfigerror=FATAL: configuration error
   tomcat.nohome=No tomcat.home property, you need to set TOMCAT_HOME or add 
-Dtomcat.home
  -tomcat.wrongargs=Wrong arguments
  +tomcat.wrongargs=Wrong arguments: type tomcat -help for valid options
   tomcat.stop=Stopping Tomcat.
   tomcat.fatal=FATAL:
   tomcat.connectexception=Could not connect to Tomcat. It's probably already stopped.
  
  
  
  1.44  +11 -1 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.43
  retrieving revision 1.44
  diff -u -r1.43 -r1.44
  --- Tomcat.java   2000/09/29 07:01:39 1.43
  +++ Tomcat.java   2000/11/30 07:51:44 1.44
  @@ -86,7 +86,13 @@
   boolean doGenerate=false;
   
   public static void printUsage() {
  - System.out.println(sm.getString("tomcat.usage"));
  + //System.out.println(sm.getString("tomcat.usage"));
  + System.out.println("Usage: java org.apache.tomcat.startup.Tomcat {options}");
  + System.out.println("  Options are:");
  + System.out.println("-config file (or -f file)  Use this fileinstead of 
server.xml");
  + System.out.println("-help (or help)Show this usage report");
  + System.out.println("-home dir (or -h dir)  Use this directory as 
tomcat.home");
  + System.out.println("-stop  Shut down currently running 
Tomcat");
   }
   
   /** Process arguments - set object properties from the list of args.
  @@ -107,10 +113,14 @@
i++;
if( i  args.length )
configFile = args[i];
  + else
  + return false;
} else if (arg.equals("-h") || arg.equals("-home")) {
i++;
if (i  args.length)
System.getProperties().put("tomcat.home", args[i]);
  + else
  + return