getOutputStream() has already been called for this response 解决

java.lang.IllegalStateException: getOutputStream() has already been called for this response

 

我在excel导出的时候出现这个错。后面网上一查,很简单的解决办法:

 

在使用完输出流以后调用以下两行代码即可:
out.clear();
out = pageContext.pushBody();

 

很有用~记录下。分享给大家!呵呵

你可能感兴趣的:(java,Excel)