Tag Archives: Send direct

[Redirect anomaly] Cannot call sendRedirect() after the response has been committed

Exception: threw exception [request processing failed; nested exception is java.lang.IllegalStateException: Cannot call sendRedirect() after the response has been committed] with root cause
java.lang.IllegalStateException: Cannot call sendRedirect() after the response has been committed

Reason:
there is no return after response reset. The subsequent program continues to run and submits the request again, so an error is reported,

When forwarding or redirecting according to conditions, the corresponding forwarding or redirecting statement is followed by return; Or return null;