2. The Structure and Deployment of Modern Servlet Web Applications
2.1. Identify the following:
2.1.1. Structure of a Web Application
2.1.1.1. the
following web application hierarchy is placed under a context
root directory within the server's webapps directory (or
something similar, depending on the server) :
2.1.1.1.1.
/[any files to be served to the client, e.g. index.html,
images/banner.gif]
2.1.1.1.2. /WEB-INF/web.xml
2.1.1.1.3.
/WEB-INF/lib/[any required jar files]
2.1.1.1.4. /WEB-INF/classes/[servlet
and support class files in their package hierarchies, e.g.
com/mycorp/frontend/CorpServlet.class]
2.1.2. Structure
of a Web Archive file
2.1.2.1. this is a JAR archive
of the Web Application structure above; it just has a WAR
extension so that people and tools know to treat it differently
2.1.2.2. a WAR file can be placed in a server's webapps
directory, and the server will extract it on startup
2.1.3. Name of Web App deployment descriptor: web.xml
2.1.4. Name of directories where you place the following:
2.1.4.1. Web App deployment descriptor: see 2.1.1.2
2.1.4.2.
Web App class file: see 2.1.1.4
2.1.4.3. Any auxhiliary
JAR files: see 2.1.1.3
2.1.4.4.
2.2. Identify the purpose or functionality for each of the following deployment descriptor elements: