geirm       01/05/09 18:12:12

  Modified:    src/java/org/apache/velocity/servlet VelocityServlet.java
  Log:
  Stopped flushing and closing the output stream, because it prevents us from
  playing nicely with others. (For example, our JSP bretheren cannot do a
  <jsp:include> and invoke a Velocity-based servlet.... baby steps...).
  
  The container is supposed to manage this anyway, so there shouldn't be a problem.
  If there is (try this in the various containers...) and we can deal, but there
  shouldn't be a problem. I ran this by Craig, and he confirmed.
  
  Revision  Changes    Path
  1.33      +7 -3      
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.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- VelocityServlet.java      2001/04/22 23:02:03     1.32
  +++ VelocityServlet.java      2001/05/10 01:12:10     1.33
  @@ -129,7 +129,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jon S. Stevens</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Geir Magnusson Jr.</a>
    * @author <a href="[EMAIL PROTECTED]">Kent Johnson</a>
  - * $Id: VelocityServlet.java,v 1.32 2001/04/22 23:02:03 geirm Exp $
  + * $Id: VelocityServlet.java,v 1.33 2001/05/10 01:12:10 geirm Exp $
    */
   public abstract class VelocityServlet extends HttpServlet
   {
  @@ -414,9 +414,13 @@
               {
                   if (vw != null)
                   {
  -                    vw.flush();
  +                    /*
  +                     * we just put the VelWriter back into the 
  +                     * pool.  We don't even have to flush.
  +                     * and we certainly shouldn't close it
  +                     */
  +
                       writerPool.put(vw);
  -                    output.close();
                   }                
               }
               catch (Exception e)
  
  
  

Reply via email to