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
a835912c
Commit
a835912c
authored
Dec 28, 2015
by
Stephane Nicoll
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '1.2.x'
parents
b1c2226e
b94c7c6a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
TomcatEmbeddedServletContainerFactory.java
...mbedded/tomcat/TomcatEmbeddedServletContainerFactory.java
+10
-8
No files found.
spring-boot/src/main/java/org/springframework/boot/context/embedded/tomcat/TomcatEmbeddedServletContainerFactory.java
View file @
a835912c
...
@@ -661,6 +661,10 @@ public class TomcatEmbeddedServletContainerFactory
...
@@ -661,6 +661,10 @@ public class TomcatEmbeddedServletContainerFactory
private
static
class
TomcatErrorPage
{
private
static
class
TomcatErrorPage
{
private
static
final
String
ERROR_PAGE_TOMCAT7
=
"org.apache.catalina.deploy.ErrorPage"
;
private
static
final
String
ERROR_PAGE_TOMCAT
=
"org.apache.tomcat.util.descriptor.web.ErrorPage"
;
private
final
String
location
;
private
final
String
location
;
private
final
String
exceptionType
;
private
final
String
exceptionType
;
...
@@ -679,14 +683,13 @@ public class TomcatEmbeddedServletContainerFactory
...
@@ -679,14 +683,13 @@ public class TomcatEmbeddedServletContainerFactory
private
Object
createNativePage
(
ErrorPage
errorPage
)
{
private
Object
createNativePage
(
ErrorPage
errorPage
)
{
Object
nativePage
=
null
;
Object
nativePage
=
null
;
try
{
try
{
if
(
ClassUtils
.
isPresent
(
if
(
ClassUtils
.
isPresent
(
ERROR_PAGE_TOMCAT
,
null
))
{
"org.apache.tomcat.util.descriptor.web.ErrorPage"
,
null
))
{
nativePage
=
BeanUtils
.
instantiate
(
ClassUtils
nativePage
=
new
org
.
apache
.
tomcat
.
util
.
descriptor
.
web
.
ErrorPage
(
);
.
forName
(
ERROR_PAGE_TOMCAT
,
null
)
);
}
}
else
if
(
ClassUtils
.
isPresent
(
"org.apache.catalina.deploy.ErrorPage"
,
else
if
(
ClassUtils
.
isPresent
(
ERROR_PAGE_TOMCAT7
,
null
))
{
null
))
{
nativePage
=
BeanUtils
.
instantiate
(
ClassUtils
nativePage
=
BeanUtils
.
instantiate
(
ClassUtils
.
forName
(
"org.apache.catalina.deploy.ErrorPage"
,
null
));
.
forName
(
ERROR_PAGE_TOMCAT7
,
null
));
}
}
}
}
catch
(
ClassNotFoundException
ex
)
{
catch
(
ClassNotFoundException
ex
)
{
...
@@ -701,8 +704,7 @@ public class TomcatEmbeddedServletContainerFactory
...
@@ -701,8 +704,7 @@ public class TomcatEmbeddedServletContainerFactory
public
void
addToContext
(
Context
context
)
{
public
void
addToContext
(
Context
context
)
{
Assert
.
state
(
this
.
nativePage
!=
null
,
Assert
.
state
(
this
.
nativePage
!=
null
,
"Neither Tomcat 7 nor 8 detected so no native error page exists"
);
"Neither Tomcat 7 nor 8 detected so no native error page exists"
);
if
(
ClassUtils
.
isPresent
(
"org.apache.tomcat.util.descriptor.web.ErrorPage"
,
if
(
ClassUtils
.
isPresent
(
ERROR_PAGE_TOMCAT
,
null
))
{
null
))
{
org
.
apache
.
tomcat
.
util
.
descriptor
.
web
.
ErrorPage
errorPage
=
(
org
.
apache
.
tomcat
.
util
.
descriptor
.
web
.
ErrorPage
)
this
.
nativePage
;
org
.
apache
.
tomcat
.
util
.
descriptor
.
web
.
ErrorPage
errorPage
=
(
org
.
apache
.
tomcat
.
util
.
descriptor
.
web
.
ErrorPage
)
this
.
nativePage
;
errorPage
.
setLocation
(
this
.
location
);
errorPage
.
setLocation
(
this
.
location
);
errorPage
.
setErrorCode
(
this
.
errorCode
);
errorPage
.
setErrorCode
(
this
.
errorCode
);
...
...
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