tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marius Sorin Barduta" <mar...@necomm.ro>
Subject [BUG] PageContext.include should do a flush() on JspWriter
Date Tue, 01 Aug 2000 12:20:08 GMT
According  to JSP 1.1 specs, regarding the include method in PageContext:
"The current JspWriter "out" for this JSP is flushed as a side-effect of
this call, prior to processing the include."

The current version (v 1.14 2000/07/11 03:48:36) of PageContextImpl.java
implements "include" as it follows:

public void include(String relativeUrlPath)
        throws ServletException, IOException
    {
        String path = getAbsolutePathRelativeToContext(relativeUrlPath);
        context.getRequestDispatcher(path).include(request, response);
    }


If the internal buffer of JspWriter contains something (written *before*
include) that will be written to OutputStream *after* include, not a desired
behaviour.

I guess an out.flush() should be added before the call to
RequestDispatcher.include.

The bug shows, for example, if you try to make your own version of
<jsp:include> tag.

best regards,

Marius

PS. I know there is a brand new bug reporting system, :-) I'll use it next
time.













Mime
View raw message