NonStop Servlets for JSP System Administrator's Guide
Configuring NSJSP
NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide—525644-001
3-12
Add a New Web Application
Add a New Web Application
You can add an application to a run-time production system, such as the iTP
WebServer, in three ways.
•
Deploy an Existing Application WAR File
•
Deploy a Web Application Automatically
•
Create a New Application
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, create the context path in iTP_server.xml, add a filemap in
servlet.config and restart the web container (the NSJSP process).
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.
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) will
be automatically expanded, unless the unpackWARs property is set to false. If you
redeploy an updated WAR file, be sure to delete the expanded directory when
restarting NSJSP, so that the updated WAR file will be re-expanded.
Any subdirectory within the application base directory that appears to be an unpacked
web application (that is, it contains a /WEB-INF/web.xml file) will receive an
automatically generated context element, even if this directory does not have context
defined in the iTPWS_INSTALL_DIR/servlet_jsp/conf/iTP_server.xml file.
This generated context entry will be configured according to the properties set in any
<DefaultContext> element nested in its <Host> element. The context path for this
deployed context will be /servlet_jsp/ followed by the directory name. The URL
needs to include the default NSJSP root directory (/servlet_jsp) when accessing a
web application using this automatically generated context:
http://hostname:port/servlet_jsp/web_application_name
To access a servlet from the browser, specify the servlet keyword in the URL, as
shown in the following example:
http://hostname:port/servlet_jsp/web_application_name/servlet
/Myservlet
The net effect of this feature is that you no longer need to define a context for your web
application in iTPWS_INSTALL_DIR/servlet_jsp/conf/iTP_server.xml
and/or a filemap in the servlet.config file, unless you wish to define non-default