解决java.lang.IllegalStateException: getOutputStream() has already been called for

http://www.blogjava.net/pengpenglin/archive/2008/01/19/176532.html

 

 

这个错误就是JSP或Servlet中同时调用了Response的getWriter和getOutputStream在同一个请求中,具体原因之类的看上面的链接,解决方法是在JSP或者Servlet中加上:

out.clear(); 
out=pageContext.pushBody();

 

这个out就是JSPWriter,在Servlet里这样获得out = pageContext.getOut();

你可能感兴趣的:(解决java.lang.IllegalStateException: getOutputStream() has already been called for)