今天在使用DeferredResult 做异步返回的时候一直报getWriter() has already been called for this response错误,网上有的说法是
web容器生成的servlet代码中有out.write(""),这个和JSP中调用的 response.getOutputStream()产生冲突,但是笔者使用的是封装的类没有办法像他们说的out.flush()一下即可,刚刚替换了tomcat的版本,之前用的是apache-tomcat-7.0.61和更低的tomcat7.x的版本,更换成apache-tomcat-7.0.9问题解决。
getWriter() has already been called for this response的解决方法
最新推荐文章于 2024-05-24 17:38:33 发布