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

Using NonStop Servlets for JavaServer Pages With
The iTP Secure WebServer
iTP Secure WebServer System Administrator’s Guide522659-001
9-23
Web Application Configuration
Web Application Configuration
Application Directory Structure
A web application is a collection of servlets, HTML pages, images, JSP pages, a
deployment descriptor and other configuration files all in one location. The web
application is organized as a structured hierarchy of directories that can be packaged or
unpackaged from a web application archive (WAR) file.
There are two parts to the directory structure:
A public area for resources such as HTML pages and images that can be used for
downloading to clients for directly rendering on the browser.
A private area with the root WEB-INF, which contains configuration files such as
the web.xml deployment descriptor, servlet classes and library files - resources that
require a managed lifecycle.
A sample application directory structure (on the NSK OSS) is shown below:
/webapps/myapp1/
index.html
login.jsp
images/
companylogo.gif
ourfounder.gif
literature/
whitepaper.pdf
WEB-INF/
web.xml
classes/
shoppingcart.class
checkout.class
lib/
xmltools.jar
src/
shoppingcart.java
checkout.java
In the example myapp1 there is a public area with files that are directly accessible for
rendering by the browser, for example, the gif and html files. Although jsp files cannot
be directly rendered, for some reason the API considers them the same as HTML files
and allows them to be located in the public area. Similarly the java source files cannot be
rendered, but can nevertheless be located in this public area - although in our examples,
for security, we locate them within the WEB-INF subdirectory.
The WEB-INF area is controlled by the web container which forwards requests to the
servlets and jsp files from the iTPWebServer.
The web container method of organizing and controlling files has numerous advantages
over the previous "servlet engine" methods.