You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by jv...@locus.apache.org on 2000/12/20 08:06:05 UTC

cvs commit: jakarta-velocity/src/java/org/apache/velocity/servlet VelocityServlet.java

jvanzyl     00/12/19 23:06:05

  Modified:    src/java/org/apache/velocity/servlet VelocityServlet.java
  Log:
  - Use the Velocity Runtime class for properties instead of the
    VelocityResources class.
  
  Revision  Changes    Path
  1.19      +5 -5      jakarta-velocity/src/java/org/apache/velocity/servlet/VelocityServlet.java
  
  Index: VelocityServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-velocity/src/java/org/apache/velocity/servlet/VelocityServlet.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- VelocityServlet.java	2000/11/17 02:28:42	1.18
  +++ VelocityServlet.java	2000/12/20 07:06:04	1.19
  @@ -72,7 +72,6 @@
   
   import org.apache.velocity.Context;
   import org.apache.velocity.Template;
  -import org.apache.velocity.runtime.configuration.*;
   import org.apache.velocity.runtime.Runtime;
   import org.apache.velocity.io.VelocityWriter;
   import org.apache.velocity.util.SimplePool;
  @@ -99,7 +98,7 @@
    * @author Dave Bryson
    * @author <a href="mailto:jon@latchkey.com">Jon S. Stevens</a>
    * @author <a href="mailto:geirm@optonline.net">Geir Magnusson Jr.</a>
  - * $Id: VelocityServlet.java,v 1.18 2000/11/17 02:28:42 daveb Exp $
  + * $Id: VelocityServlet.java,v 1.19 2000/12/20 07:06:04 jvanzyl Exp $
    */
   public abstract class VelocityServlet extends HttpServlet
   {
  @@ -176,9 +175,9 @@
               Runtime.init(propsFile);
               
               defaultContentType = 
  -                VelocityResources.getString(Runtime.DEFAULT_CONTENT_TYPE, "text/html");
  +                Runtime.getString(Runtime.DEFAULT_CONTENT_TYPE, "text/html");
               
  -            encoding = VelocityResources.getString(Runtime.TEMPLATE_ENCODING, "8859_1");
  +            encoding = Runtime.getString(Runtime.TEMPLATE_ENCODING, "8859_1");
           }
           catch( Exception e )
           {
  @@ -247,7 +246,8 @@
               vw = (VelocityWriter) writerPool.get();
             
               if (vw == null)
  -                vw = new VelocityWriter(new OutputStreamWriter(output, encoding), 4*1024, true);
  +                vw = new VelocityWriter(
  +                    new OutputStreamWriter(output, encoding), 4*1024, true);
               else
                   vw.recycle(new OutputStreamWriter(output, encoding));