jvanzyl     00/10/22 14:17:35

  Modified:    src/java/org/apache/velocity/runtime Runtime.java
  Added:       src/java/org/apache/velocity/runtime/defaults
                        velocity.properties
  Removed:     src/java/org/apache/velocity/runtime velocity.properties
  Log:
  - making directory for defaults.
  
  Revision  Changes    Path
  1.25      +7 -4      
jakarta-velocity/src/java/org/apache/velocity/runtime/Runtime.java
  
  Index: Runtime.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/runtime/Runtime.java,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- Runtime.java      2000/10/22 21:05:16     1.24
  +++ Runtime.java      2000/10/22 21:17:34     1.25
  @@ -139,7 +139,7 @@
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Jeff Bowden</a>
  - * @version $Id: Runtime.java,v 1.24 2000/10/22 21:05:16 jvanzyl Exp $
  + * @version $Id: Runtime.java,v 1.25 2000/10/22 21:17:34 jvanzyl Exp $
    */
   public class Runtime
   {
  @@ -191,7 +191,11 @@
       
       /** Turn Runtime debugging on with this field */
       private final static boolean DEBUG_ON = true;
  -    
  +
  +    /** Default Runtime properties */
  +    private final static String DEFAULT_RUNTIME_PROPERTIES = 
  +        "org/apache/velocity/runtime/defaults/velocity.properties";
  +
       /** The Runtime logger */
       private static Logger logger;
       
  @@ -224,14 +228,13 @@
        */
       public synchronized static void init() throws Exception
       {
  -        System.out.println("using init()");
           Properties properties = new Properties();
           ClassLoader classLoader = Runtime.class.getClassLoader();
           
           try
           {
               InputStream inputStream = classLoader.getResourceAsStream(
  -                "org/apache/velocity/runtime/velocity.properties");
  +                DEFAULT_RUNTIME_PROPERTIES);
           
               properties.load(inputStream);
           }
  
  
  
  1.1                  
jakarta-velocity/src/java/org/apache/velocity/runtime/defaults/velocity.properties
  
  Index: velocity.properties
  ===================================================================
  # These are the default properties for the
  # Velocity Runtime. These values are used when
  # Runtime.init() is called, Runtime.init(properties)
  # fails to find the specificed properties file.
  
  runtime.log = velocity.log
  template.loader=org.apache.velocity.runtime.loader.FileTemplateLoader
  template.modificationCheckInterval = 2
  template.path=.
  template.cache=false
  template.encoding = UTF8
  template.asciihack = true
  counter.name = velocityCounter
  counter.initial.value = 1
  default.contentType=text/html
  
  
  

Reply via email to