Win a copy of The Business Blockchain this week in the Cloud forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Duplicate error-page element

 
Andrew Rigsby
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Is it possible to have two <error-page> declarations in the DD for the same error-code or exception-type?

For example, if you have the following:

<error-page>
<error-code>404</error-code>
<location>/pages/error_page_1.jsp</location>
</error-page>

<error-page>
<error-code>404</error-code>
<location>/pages/error_page_2.jsp</location>
</error-page>

... which error page is displayed?
 
Philip Kurian
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure about the official spec, but tomcat seems ok with it.

It seems to choose the last error page declared. In this case error_page_2.jsp
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic