jvanzyl     00/11/15 23:07:10

  Modified:    src/java/org/apache/velocity/servlet VelocityServlet.java
  Log:
  - cleaning up the imports, use the VelocityWriter which is simply
    a merger and renaming of the previous writer classes we lifted
    from Jasper.
  
  Revision  Changes    Path
  1.17      +6 -9      
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.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- VelocityServlet.java      2000/11/12 17:59:25     1.16
  +++ VelocityServlet.java      2000/11/16 07:07:10     1.17
  @@ -72,12 +72,9 @@
   
   import org.apache.velocity.Context;
   import org.apache.velocity.Template;
  -
   import org.apache.velocity.runtime.Runtime;
  -
  -import org.apache.velocity.io.*;
  -
  -import org.apache.velocity.util.*;
  +import org.apache.velocity.io.VelocityWriter;
  +import org.apache.velocity.util.SimplePool;
   
   /**
    * Base class which simplifies the use of Velocity with Servlets.
  @@ -101,7 +98,7 @@
    * @author Dave Bryson
    * @author <a href="mailto:[EMAIL PROTECTED]">Jon S. Stevens</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
  - * $Id: VelocityServlet.java,v 1.16 2000/11/12 17:59:25 geirm Exp $
  + * $Id: VelocityServlet.java,v 1.17 2000/11/16 07:07:10 jvanzyl Exp $
    */
   public abstract class VelocityServlet extends HttpServlet
   {
  @@ -217,7 +214,7 @@
       {
           ServletOutputStream output = response.getOutputStream();
           String contentType = null;
  -        JspWriterImpl vw = null;
  +        VelocityWriter vw = null;
           
           try
           {
  @@ -246,10 +243,10 @@
                   throw new Exception ("Cannot find the template!" );
               
             
  -            vw = (JspWriterImpl) writerPool.get();
  +            vw = (VelocityWriter) writerPool.get();
             
               if (vw == null)
  -                vw = new JspWriterImpl(new OutputStreamWriter(output, encoding), 
4*1024, true);
  +                vw = new VelocityWriter(new OutputStreamWriter(output, encoding), 
4*1024, true);
               else
                   vw.recycle(new OutputStreamWriter(output, encoding));
              
  
  
  

Reply via email to