tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup CatalinaProperties.java
Date Thu, 13 Nov 2003 16:37:06 GMT
remm        2003/11/13 08:37:06

  Modified:    catalina/src/share/org/apache/catalina/startup
                        CatalinaProperties.java
  Log:
  - Convinience feature: set as system property everything in that file.
  - This could work well along with the property replacement to be added in
    server.xml.
  
  Revision  Changes    Path
  1.4       +15 -4     jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/CatalinaProperties.java
  
  Index: CatalinaProperties.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/startup/CatalinaProperties.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- CatalinaProperties.java	26 Sep 2003 19:31:16 -0000	1.3
  +++ CatalinaProperties.java	13 Nov 2003 16:37:05 -0000	1.4
  @@ -68,6 +68,7 @@
   import java.io.FileInputStream;
   import java.io.InputStream;
   import java.net.URL;
  +import java.util.Enumeration;
   import java.util.Properties;
   
   
  @@ -170,6 +171,16 @@
           if ((is == null) || (error != null)) {
               // Do something
               System.out.println("Error");
  +        }
  +
  +        // Register the properties as system properties
  +        Enumeration enum = properties.propertyNames();
  +        while (enum.hasMoreElements()) {
  +            String name = (String) enum.nextElement();
  +            String value = properties.getProperty(name);
  +            if (value != null) {
  +                System.setProperty(name, value);
  +            }
           }
   
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message