1、問題描述
嚴重: Servlet.service() for servlet [default] in contextwith path [/OxygenCloud] threw exception
java.lang.IllegalStateException:Cannot call sendError() after the response has been committed
2、問題分析
從提示錯誤的字面意思判斷“Cannotcall sendError() after the response has been committed”,“當response被提交后不能調用sendError()”。
出現這個錯誤,應該是多次response導致的,可以這么理解,http server發送response后就關閉了socket,這個時候再次發送response給http client就會出現這個問題。
例子:
3、問題解決
重啟運行,這個問題就沒有了。