diff --git a/docs/howto.md b/docs/howto.md index 06184558c16..56de5f5e5ef 100644 --- a/docs/howto.md +++ b/docs/howto.md @@ -771,6 +771,27 @@ dependencies are marked as "provided" in Maven or Gradle. Here's a Maven example [in the Boot Samples](https://github.com/spring-projects/spring-boot/blob/master/spring-boot-samples/spring-boot-sample-traditional/pom.xml). +A Spring Boot application deployed as a WAR file has most of the same +features as one executed from an archive, or from source code. For +example, `@Beans` of type `Servlet` and `Filter` will be detected and +mapped on startup. An exception is error page declarations, which is +essentially a consequence of the fact that there is no Java API in the +Servlet spec for adding error pages. You have to add a `web.xml` with +a global error page mapped to "/error" for the deployed WAR to work +the same way if it has error page mappings (all Actuator apps have an +error page by default). Example: + +```xml + + + + /error + + +``` + [gs-war]: http://spring.io/guides/gs/convert-jar-to-war ## Create a Deployable WAR File for older Servlet Containers