首页 > 其他 > 详细

getWriter() has already been called for this response 的解决办法

时间:2016-08-23 14:42:27      阅读:656      评论:0      收藏:0      [点我收藏+]

getWriter() has already been called for this response

response已经被其他对象调用了,导致无法继续使用如下 类似的方法

PrintWriter out = response.getWriter();
out.print("就是不让我使用");
out.flush();
out.close();

郁闷了一个早上,后来翻了几遍API,nnd   直接 这么写就OK了。真晕

response.reset();
PrintWriter out = response.getWriter();
out.print("看你还让不让我使用");
out.flush();
out.close();

不过reset的时候 有可能要response.setContentType(String);一下。

getWriter() has already been called for this response 的解决办法

原文:http://www.cnblogs.com/wujixing/p/5798986.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!