https://issues.apache.org/bugzilla/show_bug.cgi?id=48492

Alexander Horz <mozi...@horz.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |

--- Comment #2 from Alexander Horz <mozi...@horz.de> 2010-01-06 07:10:48 UTC ---
> This is as expected. Search the JSP spec for "flush".
Could you please point out why the actual behaviour should be expected 
according to the spec?

IMHO, the actual result is NOT expected (cf. JavaTM Servlet Specification,
Version 2.5 MR6, p. 61):
------------------------------------------------------------------------
SRV.8.3    The Include Method

The include method of the RequestDispatcher interface may be called at
any time. The target servlet of the include method has access to all
aspects of the request object, but its use of the response object is
more limited.

It can only write information to the ServletOutputStream or Writer of
the response object and commit a response by writing content past the
end of the response buffer, or by explicitly calling the flushBuffer
method of the ServletResponse interface. It cannot set headers [...]
------------------------------------------------------------------------

In addition, you may find (on p. 62 of the spec.):
------------------------------------------------------------------------
SRV.8.4    The Forward Method

The forward method of the RequestDispatcher interface may be called
by the calling servlet only when no output has been committed to the
client. [...]
------------------------------------------------------------------------

These two occurences are the only two near to RequestDispatcher.include().
Could you please provide a page or section number where to look for?

Anyway, in both cases (includ() or forward()) the target servlet is
expected to write to the OutputStream or Writer of the calling servlet.
Hence, if the target servlet calls the flushBuffer method, the output
of the calling servlet is expected to be appear *before* the output of
the target servlet.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to