You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by ge...@apache.org on 2001/03/20 00:19:18 UTC

cvs commit: jakarta-velocity/examples/app_example1 Example.java

geirm       01/03/19 15:19:18

  Modified:    examples/app_example1 Example.java
  Log:
  Converted to use Velocity, not Runtime
  
  Revision  Changes    Path
  1.3       +4 -5      jakarta-velocity/examples/app_example1/Example.java
  
  Index: Example.java
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/examples/app_example1/Example.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Example.java	2001/02/26 04:09:19	1.2
  +++ Example.java	2001/03/19 23:19:16	1.3
  @@ -53,7 +53,7 @@
    */
   
   
  -import org.apache.velocity.runtime.Runtime;
  +import org.apache.velocity.app.Velocity;
   import org.apache.velocity.VelocityContext;
   import org.apache.velocity.Template;
   
  @@ -69,7 +69,7 @@
    *
    * @author <a href="mailto:jvanzyl@periapt.com">Jason van Zyl</a>
    * @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
  - * @version $Id: Example.java,v 1.2 2001/02/26 04:09:19 geirm Exp $
  + * @version $Id: Example.java,v 1.3 2001/03/19 23:19:16 geirm Exp $
    */
   
   public class Example
  @@ -82,7 +82,7 @@
                * setup
                */
   
  -            Runtime.init("velocity.properties");
  +            Velocity.init("velocity.properties");
               
               /*
                *  Make a context object and populate with the data.  This 
  @@ -106,7 +106,7 @@
   
               try 
               {
  -                template = Runtime.getTemplate(templateFile);
  +                template = Velocity.getTemplate(templateFile);
               }
               catch( ResourceNotFoundException rnfe )
               {
  @@ -139,7 +139,6 @@
           catch( Exception e )
           {
               System.out.println(e);
  -            e.printStackTrace();
           }
       }