NonStop Servlets for JSP System Administrator's Guide
Overview and Architecture
NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide—525644-001
1-5
The Web Application
The Web Application
The web application is a collection of servlets, HTML pages, images, JavaServer
Pages, a deployment descriptor, and other configuration files that together represent all
the resources necessary to host a complete application on a J2EE-compliant web
server.
Web applications should be located in a directory (typically called webapps) under the
root directory of the container engine (our default for the root 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 structures are as follows
/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, 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-10.
The Deployment Descriptor
A default version of web.xml is used to set the base default contexts and MIME types
for all servlets, and can 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, as shown
in the greetings application directory structure above, that version overrides the default.
On the iTP WebServer, the default version of web.xml is located in the following
directory:
/usr/tandem/webserver/servlet_jsp/conf