• Andy Wilkinson's avatar
    Don't let standalone Tomcat render its error page after redirect · 9247cd9c
    Andy Wilkinson authored
    Previously, if the configured error controller responded with a
    redirect to an error caused by an exception, standalone Tomcat would
    render its default error page for the original exception. This
    occurred because ErrorPageFilter sets the
    javax.servlet.error.exception request attribute prior to dispatching
    to the error controller and then does not clear it. As the request
    unwinds, Tomcat's ErrorReportValve notices that the attribute is set
    and renders an error page for the exception that is the attribute's
    value.
    
    This commit updates ErrorPageFilter to remove the
    javax.servlet.error.exception and javax.servlet.error.exception_type
    attributes upon successful completion of a forward to the error
    controller. This prevents Tomcat from rendering an error page for
    an exception that has already been handled by the error controller.
    
    Closes gh-7920
    9247cd9c
Name
Last commit
Last update
.github Loading commit data...
.mvn Loading commit data...
eclipse Loading commit data...
spring-boot Loading commit data...
spring-boot-actuator Loading commit data...
spring-boot-actuator-docs Loading commit data...
spring-boot-autoconfigure Loading commit data...
spring-boot-cli Loading commit data...
spring-boot-dependencies Loading commit data...
spring-boot-deployment-tests Loading commit data...
spring-boot-devtools Loading commit data...
spring-boot-docs Loading commit data...
spring-boot-full-build Loading commit data...
spring-boot-integration-tests Loading commit data...
spring-boot-parent Loading commit data...
spring-boot-samples Loading commit data...
spring-boot-starters Loading commit data...
spring-boot-test Loading commit data...
spring-boot-test-autoconfigure Loading commit data...
spring-boot-tools Loading commit data...
.gitignore Loading commit data...
.settings-template.xml Loading commit data...
.travis.yml Loading commit data...
CODE_OF_CONDUCT.adoc Loading commit data...
CONTRIBUTING.adoc Loading commit data...
LICENSE.txt Loading commit data...
README.adoc Loading commit data...
mvnw Loading commit data...
mvnw.cmd Loading commit data...
pom.xml Loading commit data...