tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper34/runtime/org/apache/jasper34/runtime HttpJspBase.java
Date Thu, 07 Jun 2001 06:52:17 GMT
costin      01/06/06 23:52:17

  Modified:    jasper34/runtime/org/apache/jasper34/runtime
                        HttpJspBase.java
  Log:
  Few fixes I missed last time.
  
  We need to get "out" at the begining, since the page could call
  pushBody and we'll get a different out.
  
  Another small fix - out could be BodyContentImpl ( and I have no idea
  how to flush or if it should be flushed - or what happens if some
  pushBody() is called without pop ).
  
  ( one watchdog test does that ).
  
  Keeping the old behavior ( i.e. do nothing ) is probably the best idea.
  
  Revision  Changes    Path
  1.3       +8 -3      jakarta-tomcat-jasper/jasper34/runtime/org/apache/jasper34/runtime/HttpJspBase.java
  
  Index: HttpJspBase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper34/runtime/org/apache/jasper34/runtime/HttpJspBase.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- HttpJspBase.java	2001/06/06 06:45:33	1.2
  +++ HttpJspBase.java	2001/06/07 06:52:16	1.3
  @@ -121,10 +121,12 @@
       {
   
   	PageContext pageContext=null;
  +	JspWriter out=null;
   	try {
   	    try {
   		_jspx_init(); // need to be in init !
   		pageContext = _getPageContext( request, response ); 
  +		out=pageContext.getOut();
   		_jspService(pageContext, request, response );
   	    } catch (Exception ex) {
   		if (pageContext != null)
  @@ -138,9 +140,12 @@
   	    IOException err=null;
   	    if( pageContext!=null ) {
   		try {
  -		    JspWriterImpl out=(JspWriterImpl)pageContext.getOut();
  -		    if( out != null )
  -			out.flushBuffer();
  +		    // it can also be BodyContent !
  +		    // XXX how do we flush body content ?
  +		    // We only flush the top level out, what if we have
  +		    // a stack ?
  +		    if( out instanceof JspWriterImpl )
  +			((JspWriterImpl)out).flushBuffer();
   		} catch( IOException ex ) {
   		    err=ex;
   		    // handlePageException( ex );
  
  
  

Mime
View raw message