SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 102 | Next

Larry Brown, Marty Hall, and Yaakov Chaikin

"Core Servlets and JavaServer Pages, Volume 2"

sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">

404
/WEB-INF/jspPages/NotFound.jsp



Chapter 2 ?–  Controlling Web Application Behavior with web.xml 74
Figure 2??“19 Use of helpful 404 messages can enhance the usability of your site.
Listing 2.18 NotFound.jsp


404: Not Found

Error!


I'm sorry, but I cannot find a page that matches
<%= request.getAttribute("javax.servlet.forward.request_uri") %>
on the system. Maybe you should try one of the following:

  • Go to the server's home page.
  • Search for relevant pages.



    Keywords:




  • Admire a random multiple of 404:
    <%= 404*((int)(1000*Math.random())) %>.
  • Try the amazing and amusing plinko.net
    404 archive.


2.9 Designating Pages to Handle Errors 75
The exception-type Element
The error-code element handles the case when a request results in a particular
HTTP status code. But what about the equally common case when the servlet or JSP
page returns 200 but generates a runtime exception? That??™s the situation that can be
handled by the exception-type element.


Pages:
90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114