添加 finally{ out.clear(); out = pageContext.pushBody(); } 参考文章: jsp出现getOutputStream() has already been called for this response异常的原因和解决方法