Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
S
spring-boot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
DEMO
spring-boot
Commits
e58206bc
Commit
e58206bc
authored
Feb 28, 2014
by
Dave Syer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sample web.xml for error mapping
parent
7b2488de
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
howto.md
docs/howto.md
+21
-0
No files found.
docs/howto.md
View file @
e58206bc
...
@@ -771,6 +771,27 @@ dependencies are marked as "provided" in Maven or Gradle. Here's a
...
@@ -771,6 +771,27 @@ dependencies are marked as "provided" in Maven or Gradle. Here's a
Maven example
Maven example
[
in the Boot Samples
](
https://github.com/spring-projects/spring-boot/blob/master/spring-boot-samples/spring-boot-sample-traditional/pom.xml
)
.
[
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
<?xml version="1.0" encoding="UTF-8"?>
<web-app
version=
"3.0"
xmlns=
"http://java.sun.com/xml/ns/javaee"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
>
<error-page>
<location>
/error
</location>
</error-page>
</web-app>
```
[
gs-war
]:
http://spring.io/guides/gs/convert-jar-to-war
[
gs-war
]:
http://spring.io/guides/gs/convert-jar-to-war
## Create a Deployable WAR File for older Servlet Containers
## Create a Deployable WAR File for older Servlet Containers
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment