NonStop Servlets for JavaServer Pages (NSJSP) 5.0 System Administrator's Guide

Configuring NSJSP
NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide525644-003
3-14
Add a New Web Application
In the example myapp1, a public area contains the files that are directly accessible for
rendering by the browser, for example, the GIF and HTML files. Although JSP files
cannot be directly rendered, the API considers them the same as HTML files and
allows them to be located in the public area. For security reasons, in these examples,
the Java source files are located in the subdirecory of the WEB-INF subdirectory. The
WEB-INF area is controlled by the NSJSP container.
The NSJSP container knows where to look for your classes if you use this application
directory structure. You do not need to add classes and JAR files explicitly to the
CLASSPATH. Each application can be managed separately from others in the
container. To add an application, just add the context to a Context configuration file in
the $NSJSP_HOME/conf/NSJSP/<host-name>/ directory.
When this application directory structure is used, each application has its own
document root, and is the start of the context path to resources such as servlets in that
application.
Add a New Web Application
You can add an application to a run-time production system, such as the iTP
WebServer, in several ways.
Deploy an Existing Application WAR File
Deploy a Web Application Automatically
Deploy Using the Standalone Application Deployer
Deploy Using the admin or manager Web Applications
Deploy an Existing Application WAR File
If you already have a fully developed application in a WAR file, move the WAR file to
the webapps directory. Optionally, you can create the Context configuration file in the
$NSJSP_HOME/conf/NSJSP/<host-name>/ directory, add a filemap in
filemaps.config and restart the web container. This action deploys the application.
The container creates a directory that uses the WAR file name (minus the extension)
as the context (prefixed by /servlet_jsp/). For example, if the WAR file name is
myapp1.war, the container automatically creates a directory called myapp1 and
appends it to the prefix, creating a dynamic context called /servlet_jsp/myapp1
or the context specified in the <context>.xml file.
Deploy a Web Application Automatically
NSJSP supports dynamic contexts. Any web application archive (WAR) file that does
not have a corresponding directory of the same name (without the .war extension) is
expanded automatically, unless the unpackWARs property is set to false. If you
redeploy an updated WAR file, delete the expanded directory when restarting NSJSP,
so that the updated WAR file will be re-expanded.