NonStop Servlets for JavaServer Pages (5.0) System Administrator's Guide

Overview and Architecture
NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide525644-002
1-6
The WEB-INF Subdirectory
Web applications should be located in a directory (typically called webapps) under the
root directory of the container engine (default for the root for NSJSP is
/usr/tandem/webserver/servlet_jsp).
Assume you have an application called myapp1 and that one of the servlets in that
application is called helloworld.
The directory structure to myapp1 would be
/servlet_jsp/webapps/myapp1
where myapp1 is the name of your web application directory.
At this level you can store files such index.html, or create subdirectories to manage
your web application resources, for example, /images for graphics files.
The WEB-INF Subdirectory
The WEB-INF subdirectory contains private files, that is, files that cannot be directly
served to the user for rendering by the browser. These files are typically Java class
files. To deploy any servlets, you must create the WEB-INF subdirectory. This directory
contains the /classes subdirectory where you store the compiled classes, the /lib
subdirectory (containing the zip or jar files), and your customized version of the
web.xml file – the deployment descriptor.
webapps/myapp1/WEB-INF/web.xml
webapps/myapp1/WEB-INF/classes/helloworld.class
webapps/myapp1/WEB-INF/lib
A detailed description of the directory structure can be found in Configuring Web
Applications on page 3-14.
The Deployment Descriptor
A default version of web.xml sets the basic configuration for a context and MIME
types for all servlets, and can also preload and start up servlets when the web
container is first started. If you have a custom web.xml file for your particular servlet
or JSP, that custom file overrides the default.
In NSJSP, the default version of web.xml is located in the following directory:
/usr/tandem/webserver/servlet_jsp/conf
Web Archive (WAR) Files
The web application can be packaged into a web archive (WAR) file to provide a
simplified means of distributing Java class files and related resources as a single
deployment unit.