tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <>
Subject Re: flush="false" not working?
Date Thu, 13 Jun 2002 16:44:24 GMT

On Thu, 13 Jun 2002, Jim Michael wrote:

> Date: Thu, 13 Jun 2002 08:36:38 -0500
> From: Jim Michael <>
> Reply-To: Tomcat Users List <>
> To:
> Subject: Re: flush="false" not working?
> >What would you propose a servlet container do when a page has three
> >different includes, each of which wants to set the same header to
> some
> >different value?  Remember that, as far as the client is concerned,
> this
> >is a single request, so there is no such thing as a "last modified"
> >timestamp for only part of the page.
> I would suggest that the "last one to write the header wins."... right
> up until the point that the page gets returned to the browser, any part
> of the complete page (including includes) should be able to modify any
> header info, and simply the last one to write info "wins."

That works until you try a header type that accepts multiple occurrences
(like "Set-Cookie") -- sounds like a good Tower of Babel problem in the
making :-).

> It would of
> course be up to the developer to design an intelligent page so that the
> wanted results are obtained... but with the current API, we developers
> have NO WAY to do this without resorting to "@" includes, which have
> their own terrible problems...

Or setting your headers in the outer page, which is where it should be
done IMHO.  Includes are for content only -- trying to mix in control-type
functionality like modifying headers is a poor design practice.

Included servlets and JSP pages only have access to the response stream or
writer, not the headers.  Any suggestion to change that would need to go
to the feedback address for the Servlet spec:

> Jim


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message