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 Fri, 25 Aug 2000 23:19:57 GMT
I'm not sure I understand the problem.
Jasper should flush it's own buffers before calling any flush downstream.




> 1. Remove the buffer from JspWriter.  This would be cleanest, but may
> cause problems, since this kind of surgery would require modifying
> lots of code throughout JspWriterImpl, possibly leading to odd bugs,
> or at least a lot of work.  Also, I haven't thought through the
> implications viz the autoFlush attribute, though on first blush I
> don't think it would be a problem (we'd just say "Jasper is a
> buffering JSP engine" which it actually already is).

That may be a very good idea - it will also reduce the resource
usage and avoid one more memcpy() ( wow, that's the ultimate
level of performance paranoia :-).

A simpler solution would be to change jasper to generate a
flush() - I thought it does flush it's buffer at the end of the
request, or it should.


> 2. Make Jasper implement a facade over Response (actually over
> HttpServletResponse) that correctly implements flushBuffer by calling
> jspwriter.flush(); this would have to be done inside _jspService,
> meaning inside generated code, which seems flakey to me.  Also, a
> trivial implementation of such a facade would lead to performance
> issues (making a few new objects per JSP request), unless we use
> pooling, which seems also like a lot of work.

I don't think it's a good solution.
It's jasper ( or any other app on top of tomcat ) that should
flush it's own internal buffers - if any.

> 3. Add a private callback method to our HttpServletResponse (in our
> facade manager, called from Response.java to make the
> HttpServletResponse facade) that calls Jasper when flushBuffer is
> called; this would break compatibility with other servlet engines.

That's a clear -1.

Costin


Mime
View raw message