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-2
Overview
properties file is now obsolete. For further details on migration, consult Migration From
T0094 to T1222 on page 9-43.
To use this documentation, you should have some familiarity with the Java language
and tools and the servlet application programming interface (API) as defined by Sun
Microsystems. This section does not attempt to teach you how to program servlets or
JSPs, although it does offer advice and ideas.
You also should be familiar with the overall iTP Secure WebServer environment, which
must be installed and running before you can install and use NSJSP.
Overview
This is a brief description of the main directories and configuration necessary to get
NSJSP up and running. (The examples assume the default location of
/usr/tandem/webserver as the root of your directory structure.) Given this
information, you can answer the key question of How To Map From URL To Servlet on
page 9-4.
Example 9-1 contains a roadmap of the main directories and configuration necessary
to get NSJSP up and running. This is only intended as an overview of the way things
work together - specifically to answer the question, "How do you get from a URL to the
application and to a servlet?"
The first configuration file is servlet.config which is located in the /conf directory
of /usr/tandem/webserver.
servlet.config - For each application (a collection of related servlets and
resources) you must create a Filemap, mapping those servlets to the server object
code. For example, to add the application myapp1 and its related servlets
filemap /myapp1 $server_objectcode
You must specify the home for NSJSP by setting the environment variable
set env(SERVLET_JSP_HOME) /usr/tandem/webserver/servlet_jsp
The other two main configuration files are located in the /servlet_jsp directory.
This default root directory for NSJSP is /usr/tandem/webserver/servlet_jsp.
The /conf subdirectory contains two main configuration files;
iTP_server.xml - You must create a context path for every application. Use
context path to specify the directory (application) name, and use docbase to
specify the path from the root (servlet_jsp) to the application. This ensures any
URL that contains the application name and a resource name, such as a servlet
name, can locate that resource.
web.xml - This file is known as a deployment descriptor because it contains xml
commands you use to deploy and control servlets and JSP. You may set alias
names for them (the default is the class name), initialize with values, provide MIME
mapping, welcome and error pages, and so on.