You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by G�bor Lipt�k <ga...@usa.net> on 2000/03/21 16:12:52 UTC

jakarta-tomcat cvs diff bug 87 (Tomcat eats exception thrown in page ...)

Index: src/share/org/apache/jasper/compiler/JspParseEventListener.java
===================================================================
RCS file:
/home/cvspublic/jakarta-tomcat/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
retrieving revision 1.11
diff -u -r1.11 JspParseEventListener.java
--- src/share/org/apache/jasper/compiler/JspParseEventListener.java	2000/02/25
19:48:16	1.11
+++ src/share/org/apache/jasper/compiler/JspParseEventListener.java	2000/03/22
00:00:00
@@ -323,8 +323,7 @@
 	//writer.println("} catch (Throwable t) {");
 	writer.println("} catch (Exception ex) {");
 	writer.pushIndent();
-        writer.println("if (out.getBufferSize() != 0)");
-        writer.pushIndent(); writer.println("out.clear();");
writer.popIndent();
+        writer.println("out.clearBuffer();");
 	writer.println("pageContext.handlePageException(ex);");
 	writer.popIndent();
 	writer.println("} finally {");

____________________________________________________________________
Get free email and a permanent address at http://www.amexmail.com/?A=1

Re: jakarta-tomcat cvs diff bug 87 (Tomcat eats exception thrown in page ...)

Posted by Danno Ferrin <sh...@earthlink.net>.
My reading of this indicates it violates the JSP spec, and the JSP page
may fail to handle an error if the page buffer is already flushed via
autoflush. (page 47).  What this code introduces is the possibility that
half of the page may already be sent to the client and the next half
will be the error page, creating a fragmented response, but that is
undesirable.

-1 only on the basis of what the spec says.


--Danno

"Gábor Lipták" wrote:
> 
> Index: src/share/org/apache/jasper/compiler/JspParseEventListener.java
> ===================================================================
> RCS file:
> /home/cvspublic/jakarta-tomcat/src/share/org/apache/jasper/compiler/JspParseEventListener.java,v
> retrieving revision 1.11
> diff -u -r1.11 JspParseEventListener.java
> --- src/share/org/apache/jasper/compiler/JspParseEventListener.java     2000/02/25
> 19:48:16        1.11
> +++ src/share/org/apache/jasper/compiler/JspParseEventListener.java     2000/03/22
> 00:00:00
> @@ -323,8 +323,7 @@
>         //writer.println("} catch (Throwable t) {");
>         writer.println("} catch (Exception ex) {");
>         writer.pushIndent();
> -        writer.println("if (out.getBufferSize() != 0)");
> -        writer.pushIndent(); writer.println("out.clear();");
> writer.popIndent();
> +        writer.println("out.clearBuffer();");
>         writer.println("pageContext.handlePageException(ex);");
>         writer.popIndent();
>         writer.println("} finally {");
> 
> ____________________________________________________________________
> Get free email and a permanent address at http://www.amexmail.com/?A=1
> 
>   ------------------------------------------------------------------------
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org