`
mymobile
  • 浏览: 184568 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

异常:getOutputStream() has already been called for this response 的解决方法

 
阅读更多

今天在第一次接触使用“验证码”功能时,在执行时出现了异常信息:

    严重: Servlet.service() for servlet jsp threw exception
    java.lang.IllegalStateException: getOutputStream() has already been called for this response。

在网上搜索之后的解决方法是:

在生成验证码的jsp文件末尾添加两句话

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

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics