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 99 | Next

Larry Brown, Marty Hall, and Yaakov Chaikin

"Core Servlets and JavaServer Pages, Volume 2"

jsp
Listing 2.16 web.xml (Excerpt showing filter usage)

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation=
"http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
version="2.4">

PageName
/WEB-INF/jspPages/TestPage.jsp


PageName
/UrlTest7/*


Reporter
coreservlets.ReportFilter


Reporter
PageName



Chapter 2 ?–  Controlling Web Application Behavior with web.xml 72
first and index.html second. If neither is found, the result is server specific (e.g., a
directory listing).

index.jsp
index.html

Although many servers follow this behavior by default, they are not required to do
so. As a result, it is good practice to explicitly use welcome-file-list to ensure
portability.
Core Approach
Make welcome-file-list a standard entry in your web.xml files.
2.9 Designating Pages
to Handle Errors
Now, we realize that you never make any mistakes when developing servlets and JSP
pages and that all of your pages are so clear that no rational person could be confused
by them.


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