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 Guide—522659-001
9-5
How To Map From URL To Servlet
Every application must have a WEB-INF subdirectory. This is a required subdirectory. It
is a private area whose contents cannot be directly served to users. WEB-INF is a
structured set of subdirectories containing servlet classes, archives, and another
deployment descriptor (application-specific) web.xml file. Use this web.xml file to
override any settings made with global scope in web.xml in the /servlet_jsp/conf
directory.
Java class files are located in the /classes subdirectory. This is a required subdirectory.
The server looks for class files here (either by class name or alias - set in either web.xml
files), and places class files here after exploding JAR files stored in /lib.
You could also place java source files in a /src subdirectory. This is optional.
For further details, see Application Directory Structure
on page 9-23.
How To Map From URL To Servlet
The key question is, how do you map from a URL to the application and to the servlet or
JSP?
The application name and the context path gets you to the application subdirectory. No
further path is necessary to find a servlet or JSP within that application. The deployment
descriptor xml (web.xml) file defines the rest of the path.
The location of the application directory (and therefore the servlet or JSP) is determined
in the docbase attribute inside iTP_server.xml.
The servlet or JSP could be any name (given the <servlet-name> and <servlet-class>
xml elements of the web.xml file) not just the class name. This allows separation
between the web pages (using a servlet name) and the underlying java code (using the
class name) and so makes maintenance easier.
The servlet or JSP does not even need a name, given the <servlet mapping> xml element
of the web.xml file. You can set the mapping so that one servlet or JSP is always the
start of the application. If so, it does not need to be named in the URL. This is certainly
convenient, and it may also be more secure.
For further details, see Mapping Requests to Applications and Servlets
on page 9-26.
Java 2 Enterprise Edition (J2EE) Overview
This is a general introduction to J2EE concepts that enable the use of dynamic
applications to communicate over HTTP with client browsers, specifically web
containers, servlets, JSP, Java classes, and deployment descriptors.
The iTPWebServer implementation of servlets and JSP is a key component for J2EE
compliance. It will allow support for Java-based Himalaya products.
For an overview of all these other components of a complete J2EE environment, consult
the Sun Microsystems J2EE website.
In the J2EE architecture there are two types of client; web clients and application clients.
Application clients belong to the client-server model where the “fat” client provided not