getResponse的getWriter()方法连续两次输出流到页面的时候,第二次的流会包括第一次的流,所以可以使用将response.reset或者resetBuffer的方法。

reset():
Clears any data that exists in the buffer as well as the status code and headers. If the response has been committed, this method throws an IllegalStateException.

resetBuffer():
Clears the content of the underlying buffer in the response without clearing headers or status code. If the response has been committed, this method throws an IllegalStateException.

 
评论
发表评论

您还没有登录,请登录后发表评论

hydex
搜索本博客
我的相册
5e0be7a5-3ea9-31fe-a7c4-7a19f3b7d537-thumb
自行车
共 1 张
存档
最新评论