tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From na...@locus.apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup LocalStrings.properties LocalStrings_es.properties Tomcat.java
Date Tue, 04 Apr 2000 00:58:20 GMT
nacho       00/04/03 17:58:19

  Modified:    src/share/org/apache/tomcat/startup Tomcat.java
  Added:       src/share/org/apache/tomcat/startup LocalStrings.properties
                        LocalStrings_es.properties
  Log:
  Added  i18n support to Main
  Added Spanish Locale
  
  Revision  Changes    Path
  1.21      +12 -9     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.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- Tomcat.java	2000/03/31 22:34:58	1.20
  +++ Tomcat.java	2000/04/04 00:58:19	1.21
  @@ -23,6 +23,9 @@
    */
   public class Tomcat {
   
  +    private static StringManager sm = StringManager.getManager("org.apache.tomcat.startup");
  +
  +
       static {
   	// XXX temp fix for wars
   	// Register our protocols XXX
  @@ -49,7 +52,7 @@
   	xh.addRule( "ContextManager/ContextInterceptor", xh.setParent("setContextManager") );
   	xh.addRule( "ContextManager/ContextInterceptor", xh.addChild( "addContextInterceptor",
   								      "org.apache.tomcat.core.ContextInterceptor" ) );
  -	
  +
   	xh.addRule( "ContextManager/RequestInterceptor", xh.objectCreate(null, "className"));
   	xh.addRule( "ContextManager/RequestInterceptor", xh.setProperties() );
   	xh.addRule( "ContextManager/RequestInterceptor", xh.setParent("setContextManager") );
  @@ -106,7 +109,7 @@
   	// Use the "tomcat.home" property to resolve the default filename
   	String tchome = System.getProperty("tomcat.home");
   	if (tchome == null) {
  -	    System.out.println("No tomcat.home property, you need to set TOMCAT_HOME or add -Dtomcat.home");
  +	    System.out.println(sm.getString("tomcat.nohome"));
   	    tchome = ".";	// Assume current working directory
   	}
   	// Home will be identical to tomcat home if default config is used.
  @@ -117,13 +120,13 @@
   
       public void execute(String args[] ) throws Exception {
   	if( ! processArgs( args ) ) {
  -	    System.out.println("Wrong arguments");
  +	    System.out.println(sm.getString("tomcat.wrongargs"));
   	    printUsage();
   	    return;
   	}
   
   	if( doStop ) {
  -	    System.out.println("Stop tomcat");
  +	    System.out.println(sm.getString("tomcat.stop"));
   	    stopTomcat(); // stop serving
   	    return;
   	}
  @@ -139,7 +142,7 @@
   	try {
   	    xh.readXml(f,cm);
   	} catch( Exception ex ) {
  -	    System.out.println("FATAL: configuration error" );
  +	    System.out.println(sm.getString("tomcat.fatalconfigerror") );
   	    ex.printStackTrace();
   	    System.exit(1);
   	}
  @@ -149,7 +152,7 @@
   	org.apache.tomcat.task.ApacheConfig apacheConfig=new  org.apache.tomcat.task.ApacheConfig();
   	apacheConfig.execute( cm );     
   
  -	System.out.println("Starting tomcat. Check logs/tomcat.log for error messages ");
  +	System.out.println(sm.getString("tomcat.start"));
   	cm.init(); // set up contexts
   	cm.start(); // start serving
       }
  @@ -159,7 +162,7 @@
   	    Tomcat tomcat=new Tomcat();
   	    tomcat.execute( args );
   	} catch(Exception ex ) {
  -	    System.out.println("FATAL: " + ex );
  +	    System.out.println(sm.getString("tomcat.fatal") + ex );
   	    ex.printStackTrace();
   	}
   
  @@ -182,7 +185,7 @@
   	try {
   	    xh.readXml(f,cm);
   	} catch( Exception ex ) {
  -	    System.out.println("FATAL: configuration error" );
  +	    System.out.println(sm.getString("tomcat.fatalconfigerror") );
   	    ex.printStackTrace();
   	    System.exit(1);
   	}
  @@ -222,7 +225,7 @@
       boolean doStop=false;
       
       public static void printUsage() {
  -	System.out.println("usage: ");
  +	System.out.println(sm.getString("tomcat.usage"));
       }
   
       /** Process arguments - set object properties from the list of args.
  
  
  
  1.1                  jakarta-tomcat/src/share/org/apache/tomcat/startup/LocalStrings.properties
  
  Index: LocalStrings.properties
  ===================================================================
  # $Id: LocalStrings.properties,v 1.1 2000/04/04 00:58:19 nacho Exp $
  
  tomcat.usage=usage: 
  tomcat.start=Starting tomcat. Check logs/tomcat.log for error messages 
  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.stop=Stop tomcat
  tomcat.fatal=FATAL:
  
  
  1.1                  jakarta-tomcat/src/share/org/apache/tomcat/startup/LocalStrings_es.properties
  
  Index: LocalStrings_es.properties
  ===================================================================
  # $Id: LocalStrings_es.properties,v 1.1 2000/04/04 00:58:19 nacho Exp $
  
  tomcat.usage=uso: 
  tomcat.start=Iniciando tomcat. Comprueba el archivo logs/tomcat.log si hay errores
  tomcat.fatalconfigerror=FATAL: error de configuracion
  tomcat.nohome=No existe la propiedad tomcat.home, necesitas crear la variable del entorno
TOMCAT_HOME o usar -Dtomcat.home=/ruta/a/tomcat
  tomcat.wrongargs=Argumentos no validos
  tomcat.stop=Parando tomcat
  tomcat.fatal=FATAL:
  
  

Mime
View raw message