java.lang.IllegalStateException: Can't sendRedirect() after data has committed to the client.java.lang.IllegalStateException: forward() not allowed after buffer has committed.

解决方案 »

  1.   


    什么意思?这个是在写日志newblogAction,日志保存完成后,跳转页面的时候抛出的。如果说之前对response之前有write操作,应该是每次都抛出异常,我查了,那个Action找不到该的操作。而现在问题是异常出现的概率不是很大,但因为访问量很大,出现次数很多,很烦人。
      

  2.   

    sendRedirect之后需要return;
    否则数据会被发送到客户端,一旦有数据被发送到客户端之后就不能Redirect了,他的提示:Can't sendRedirect() after data has committed to the client. 就是这个意思