首页 > 编程语言 > 详细

Java.lang.IllegalStateException: Cannot call sendRedirect() after the response has been committed

时间:2019-01-20 10:51:49      阅读:165      评论:0      收藏:0      [点我收藏+]

在使用response重定向的时候,报以下错误:
Java.lang.IllegalStateException: Cannot call sendRedirect() after the response has been committed
原因如下:
  1.   response重定向后没有return,后续程序继续运行,遇到了后续的再次重定向代码报错。
    解决方法:重定向后return。

  2. response重定向后还有重定向 ,重复的重定向

    解决办法:去掉其中的一个redirect,或者response

Java.lang.IllegalStateException: Cannot call sendRedirect() after the response has been committed

原文:https://www.cnblogs.com/ggq-insist-qiang/p/10293993.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!