costin      01/03/31 14:30:38

  Modified:    src/share/org/apache/jasper/compiler
                        JspParseEventListener.java
               src/share/org/apache/jasper/runtime JspFactoryImpl.java
  Log:
  Rollback - flushBuffer can throw IOException - if we put it in
  JspFactoryImpl.releasePageContext  we'll have to ignore it or do some
  tricks with runtime exception.
  
  After all the generated code depends anyway on the details of the jasper
  runtime - it extends jasper.runtime.HttpJspBase.
  With the tagpool and other optimizations it's likely we'll have even more
  dependencies - i.e. the generated code will take advantage of other runtime
  facilities.
  
  Revision  Changes    Path
  1.27      +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.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- JspParseEventListener.java        2001/03/31 22:06:16     1.26
  +++ JspParseEventListener.java        2001/03/31 22:30:38     1.27
  @@ -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.12      +4 -8      
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.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- JspFactoryImpl.java       2001/03/31 22:06:16     1.11
  +++ JspFactoryImpl.java       2001/03/31 22:30:38     1.12
  @@ -1,7 +1,7 @@
   /*
  - * $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 $
  + * $Header: 
/home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspFactoryImpl.java,v 
1.12 2001/03/31 22:30:38 costin Exp $
  + * $Revision: 1.12 $
  + * $Date: 2001/03/31 22:30:38 $
    *
    * ====================================================================
    * 
  @@ -84,7 +84,7 @@
       static {
        try {
            lineSeparator =  System.getProperty("line.separator");
  -     } catch( Exception ex ) {
  +     } catch( RuntimeException ex ) {
            lineSeparator="\r\n";
        }
        // This whole things allows us to set the writer line
  @@ -124,10 +124,6 @@
   
       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 );
  
  
  

Reply via email to