This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error-page

 
jyothi sanka
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
<error-page>
<error-code>500</error-code>
<exception-type>java.lang.Throwable</exception-type> <location>/errorhandler.jsp</location>
</error-page>

can we use error code and,exception-type elements in single error-page element?
 
Jose Esteban
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope.
 
Colin Fletcher
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
From the spec (page 291)

<!--
The error-page element contains a mapping between an error code or
exception type to the path of a resource in the web application
-->
<!ELEMENT error-page ((error-code | exception-type), location)>
<!--
The error-code contains an HTTP error code, ex: 404
-->
<!ELEMENT error-code (#PCDATA)>
<!--
The exception type contains a fully qualified class name of a Java
exception type.
-->
<!ELEMENT exception-type (#PCDATA)>
<!--
The location element contains the location of the resource in the
web application
-->
<!ELEMENT location (#PCDATA)>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic