• 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
 
I promise I will be the best, most loyal friend ever! All for this tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!