iTP Secure WebServer System Administrator's Guide (iTPWebSvr 6.0+)

Using NonStop Servlets for JavaServer Pages
(NSJSP)
iTP Secure WebServer System Administrator’s Guide523346-002
9-8
The Web Application
The Web Application
The web application is a collection of servlets, HTML, 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 under the root directory of the
container engine (our default for the root is /usr/tandem/webserver/
servlet_jsp), typically called webapps.
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 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 the Web
Application on page 9-24.
The Deployment Descriptor
There is a “default” version of web.xml that 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 iTPWebServer, the default version of web.xml is located in the following
directory
/usr/tandem/webserver/servlet_jsp/conf