You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by co...@apache.org on 2001/04/01 00:06:16 UTC

cvs commit: jakarta-tomcat/src/share/org/apache/jasper/runtime JspFactoryImpl.java

costin      01/03/31 14:06:16

  Modified:    src/share/org/apache/jasper/compiler
                        JspParseEventListener.java
               src/share/org/apache/jasper/runtime JspFactoryImpl.java
  Log:
  Move the flushBuffer() call to JspFactoryImpl.releasePageContext(),
  it's a much cleaner way to separate the generated jsp from the
  runtime.
  
  Revision  Changes    Path
  1.26      +3 -3      jakarta-tomcat/src/share/org/apache/jasper/compiler/JspParseEventListener.java
  
  Index: JspParseEventListener.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
  retrieving revision 1.25
  retrieving revision 1.26
  diff -u -r1.25 -r1.26
  --- JspParseEventListener.java	2001/03/24 06:49:29	1.25
  +++ JspParseEventListener.java	2001/03/31 22:06:16	1.26
  @@ -374,9 +374,9 @@
   
   	// Use flush buffer ( which just empty JspWriterImpl buffer )
   	// instead of commiting the response.
  -	writer.println("if (out instanceof org.apache.jasper.runtime.JspWriterImpl) { ");
  -        writer.println("    ((org.apache.jasper.runtime.JspWriterImpl)out).flushBuffer();");
  -	writer.println("}");
  +	//writer.println("if (out instanceof org.apache.jasper.runtime.JspWriterImpl) { ");
  +        // writer.println("    ((org.apache.jasper.runtime.JspWriterImpl)out).flushBuffer();");
  +	// writer.println("}");
   	writer.println("if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);");
   	writer.popIndent();
   	writer.println("}");
  
  
  
  1.11      +7 -3      jakarta-tomcat/src/share/org/apache/jasper/runtime/JspFactoryImpl.java
  
  Index: JspFactoryImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspFactoryImpl.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- JspFactoryImpl.java	2001/03/02 06:56:19	1.10
  +++ JspFactoryImpl.java	2001/03/31 22:06:16	1.11
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspFactoryImpl.java,v 1.10 2001/03/02 06:56:19 costin Exp $
  - * $Revision: 1.10 $
  - * $Date: 2001/03/02 06:56:19 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspFactoryImpl.java,v 1.11 2001/03/31 22:06:16 costin Exp $
  + * $Revision: 1.11 $
  + * $Date: 2001/03/31 22:06:16 $
    *
    * ====================================================================
    * 
  @@ -124,6 +124,10 @@
   
       public void releasePageContext(PageContext pc) {
   	if( pc==null ) return;
  +	JspWriterImpl out=(JspWriterImpl)pc.getOut();
  +	if( out!=null ) {
  +	    out.flushBuffer();
  +	}
   	pc.release();
   	if( usePool) {
   	    pool.put( pc );