Use RequestDispatcher.ERROR_STATUS_CODE constant

See gh-20923
pull/21002/head
K Zoli 5 years ago committed by Stephane Nicoll
parent a2350e58d2
commit 0d532042cb

@ -20,6 +20,7 @@ import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import javax.servlet.RequestDispatcher;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@ -103,7 +104,7 @@ public abstract class AbstractErrorController implements ErrorController {
}
protected HttpStatus getStatus(HttpServletRequest request) {
Integer statusCode = (Integer) request.getAttribute("javax.servlet.error.status_code");
Integer statusCode = (Integer) request.getAttribute(RequestDispatcher.ERROR_STATUS_CODE);
if (statusCode == null) {
return HttpStatus.INTERNAL_SERVER_ERROR;
}

Loading…
Cancel
Save