在使用response重定向的時候,報以下錯誤:
Java.lang.IllegalStateException: Cannot call sendRedirect() after the response has been committed
原因如下:
1. response重定向后沒有return,后續程序繼續運行,遇到了后續的再次重定向代碼報錯。
解決方法:重定向后return。
2. response重定向后還有重定向 ,重復的重定向
解決辦法:去掉其中的一個redirect,或者response
