Java Reference
In-Depth Information
T ABLE A.1
Continued
Directory
Description
This directory contains all resources related to
the application that are not in the document
root of the application. You must note that the
WEB-INF directory is not part of the public
document tree of the application. No file con-
tained in this directory can be served directly
to a client.
/ applicationname /WEB-INF
This directory is where servlet and utility
classes are located.
/ applicationname /WEB-INF/classes
The applicationname we use throughout this topic is djs ; therefore you need to substitute djs
for applicationname in the previously described directory structure.
Web Application Deployment Descriptors
The Web application deployment descriptor describes configuration and deployment informa-
tion for the entire Web application. The Web application descriptor is an XML file named
web.xml , located in the /<SERVER_ROOT>/ applicationname /WEB-INF/ directory. For our appli-
cation the location of the web.xml file is in the /<SERVER_ROOT>/djs/WEB-INF/ directory. The
information that is contained in the deployment descriptor includes the following elements:
ServletContext init parameters
Localized content
Session configuration
Servlet/JSP definitions
Servlet/JSP mappings
Mime type mappings
Welcome file list
Error pages
Security
A
The XML descriptor elements that we focus on are mainly servlet specific. The following code
snippet contains an example of a Web application deployment descriptor:
<web-app>
<display-name>A Basic Application</display-name>
<session-timeout>30</session-timeout>
 
Search WWH ::




Custom Search