NonStop Servlets for JavaServer Pages (5.0) System Administrator's Guide
Configuring NSJSP
NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide—525644-002
3-16
Deploy Using the Standalone Application Deployer
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:
http://hostname:port/servlet_jsp/web_application_name/servlet
/Myservlet
This feature allows you to not define a context for your web application in
$NSJSP_HOME/conf/NSJSP/<host-name>/ directory or a filemap in the
filemaps.config file, unless you wish to define non-default properties for the
corresponding context or unless you do not want to add an extra NSJSP root directory
(/servlet_jsp) when accessing a web application.
Deploy Using the Standalone Application Deployer
NSJSP supports a standalone application deployer which validates, compiles, and
deploys a web application to a live NSJSP container. Customer web applications can
be validated and compiled before they are placed in a production environment.
The standalone application deployer consists of the manager Ant tasks, the JSP
compiler, and a task which validates the application deployment descriptor. By using
the Ant script build.xml, the deployer can:
•
Compile and validate without a running NSJSP container
•
Deploy a web application to a running NSJSP container
•
Undeploy a web application in a running NSJSP container
•
Start and stop a web application in a running NSJSP container
•
Reload a web application in a running NSJSP container
The deployer package and the Ant script can be easily integrated with many
application IDE products allowing you to develop and deploy web applications from the
same IDE. See the web.xml file for an example of the Ant script build.xml. In the
example below, you can run the Ant script to manage a web application called myapp:
C:\java\nsjsp 5.0\deployer> ant
Buildfile: build.xml
clean:
compile:
[copy] Copying 299 files to C:\java\nsjsp5.0\deployer\build\myapp
[validator] web.xml validated
[javac] Compiling 41 source files to
C:\java\nsjsp5.0\deployer\build\myapp\WEB-INF\classes
[javac] Note: C:\java\nsjsp 5.0\deployer\build\myapp\WEB-
INF\classes\examples\LogTag.java uses or overrides a deprecated API.
[javac] Note: Recompile with -deprecation for details.
[jar] Building jar: C:\java\nsjsp 5.0\deployer\build\myapp.war