更新时间:2022-01-13 06:58:40
解释在你自己的问题中:
The explanation is in your own question:
JspWriter在场景后面使用PrintWriter,但由于默认情况下
JSP页面被缓冲,因此在
缓冲区之前不会创建PrintWriter刷新
JspWriter uses a PrintWriter behind the scene, but since by default JSP pages are buffered, the PrintWriter won't be created until the buffer is flushed
这意味着写入JspWriter的内容被缓冲,并且刷新此缓冲区后(因为缓冲区已满) ,或者因为JSP已经到了执行的末尾),内容被写入响应的PrintWriter。
This means that what is written to the JspWriter is buffered, and once this buffer is flushed (either because the buffer is full, or because the JSP has reached the end of its execution), the contents is written to the response's PrintWriter.
所以你的例子的流程如下:
So the flow of your example is the following one: