As far as I understand it, jsp has it's own response stream with buffer (of type JspWriter) on top of the one we get from response.getWriter().
By the way, you can check this by setting In this case content included with RequestDispatcher will appear in the right place, because all otput from jsp will be automatically flushed to the actual response strean.