tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmanola...@yahoo.com
Subject Re: BUG: flushBuffer in Jasper
Date Sat, 26 Aug 2000 06:24:14 GMT
Alex Chaffee wrote:

> On Fri, Aug 25, 2000 at 04:19:57PM -0700, cmanolache@yahoo.com wrote:
> > I'm not sure I understand the problem.
> > Jasper should flush it's own buffers before calling any flush downstream.

> It does.  But flushBuffer is a method on *response*, which was passed
> in from Tomcat, which has its own buffer.  Which it flushes.  But
> Jasper's buffer is somewhere else (inside JspWriterImpl), that
> Response doesn't know about, so it stays full.

I still don't understand...

The generated code calls out.flush(), and out is JspWriterImpl.
It's up to JspWriterImpl to flush it's own buffers downstream
and call the next flush().

If jasper generates any code that calls Response.flush() than we
need to replace it with out.flush(), or at least that's my understanding.

But I agree with Alex, just removing the extra buffering can't hurt
and can be the best solution.

( as a side note, in tomcat 3.2 with JspInterceptor - i.e. no
JspServlet overhead, a Jsp page is ~5% faster than a servlet doing the
same thing, and it's the buffer  that does this. OutputBuffer started
with cut&paste from JspWriter and few other places :-)


> There's a JspWriter whose flush method works fine.  But there's no
> "JspResponse" or equivalent (that would be my facade solution).
>
> This is really the fault of the API; I see no reason for having a
> Response.flushBuffer() call when out.flush() should (and does) do the
> job perfectly well.  Maybe I should ask the JSR 53 experts why they
> added this method to Response.

Can you point me to some generated code that does this? I'm totaly
lost on this one.

Costin




Mime
View raw message