Skip to content

Commit 4a0e821

Browse files
committed
Merge branch '2.1.x' into 2.2.x
Closes gh-21759
2 parents 296da88 + 5dce945 commit 4a0e821

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

spring-boot-project/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2472,12 +2472,20 @@ Note that the default `FilterRegistrationBean` does not include the `ERROR` disp
24722472

24732473

24742474

2475-
[[boot-features-error-handling-websphere]]
2476-
CAUTION:When deployed to a servlet container, Spring Boot uses its error page filter to forward a request with an error status to the appropriate error page.
2477-
The request can only be forwarded to the correct error page if the response has not already been committed.
2475+
[[boot-features-error-handling-war-deployment]]
2476+
===== Error handling in a war deployment
2477+
When deployed to a servlet container, Spring Boot uses its error page filter to forward a request with an error status to the appropriate error page.
2478+
This is necessary as the Servlet specification does not provide an API for registering error pages.
2479+
Depending on the container that you are deploying your war file to and the technologies that your application uses, some additional configuration may be required.
2480+
2481+
The error page filter can only forward the request to the correct error page if the response has not already been committed.
24782482
By default, WebSphere Application Server 8.0 and later commits the response upon successful completion of a servlet's service method.
24792483
You should disable this behavior by setting `com.ibm.ws.webcontainer.invokeFlushAfterService` to `false`.
24802484

2485+
If you are using Spring Security and want to access the principal in an error page, you must configure Spring Security's filter to be invoked on error dispatches.
2486+
To do so, set the `spring.security.filter.dispatcher-types` property to `async, error, forward, request`.
2487+
2488+
24812489

24822490

24832491
[[boot-features-spring-hateoas]]

0 commit comments

Comments
 (0)