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-30
Servlet Programming Considerations
Servlet Programming Considerations
This subsection discusses features used for writing servlets. For example, it describes
the implications of using server classes for threading and context management.
A servlet uses the servlet API to receive and respond to requests from web clients. It
uses other NonStop Server for Java packages to perform such functions as access to
NonStop SQL/MP databases. Because a NSJSP process is a NonStop TS/MP server
class, your servlets inherit the scalability, persistence, and performance benefits of
such classes.
This section provides only a brief summary of how to use the Servlet API 2.2. For
detailed information about the Servlet API 2.2, see the Java Servlet API Specification,
Version 2.2 at the following web site:
http://java.sun.com/products/servlet/download.html
and other API documentation available from JavaSoft.
For information about programming with NonStop Server for Java, see NonStop Server
for Java Programmers Guide.
Servlet Programming Environment
There are two ways to create a new servlet or modify an existing servlet for the iTP
Secure WebServer environment. Use NonStop Server for Java or use some other
standard Java environment.
NonStop Server for Java
NonStop Server for Java is based on the Sun Microsystems, Inc. Java Developer’s Kit,
Version 2.0 and has been certified as fully Java-compliant by JavaSoft. It includes the
Java Virtual Machine (JVM) and all standard Java tools except appletviewer. It also
includes the following features:
SQL/MP for Java. This feature gives your servlet access to NonStop SQL/MP
databases.
Transaction protection using the HP NonStop Transaction Management Facility
(TMF).
Just-in-time (JIT) compiler. This feature improves the performance of a servlet by
translating Java byte codes to the native instruction set when a class is loaded,
rather than reinterpreting the byte codes for every use of a class.
NonStop Server for Java runs in the OSS environment on the NonStop system and
uses OSS features, such as the POSIX pthreads package to support multithreading.
For detailed information about NonStop Server for Java, see NonStop Server for Java
Programmer’s Guide.