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

Programming and Management Features
NonStop Servlets for JavaServer Pages (NSJSP) 6.0 System Administrator’s Guide544548-004
4-4
Programming using other Java Environments
Programming using other Java Environments
You can develop servlets in other Java environments and use them on the NonStop
system, for example:
The Abstract Windowing Toolkit (AWT) is included in the NonStop Server for Java
5 but classes that produce graphical output, return an exception.
NonStop Server for Java 5 supports runtime execution of invisible Java beans but
does not support runtime execution that requires a graphical user interface (GUI)
operation.
Transaction protection in NonStop Server for Java 5 is based on, but not identical
to, the current interface defined by Java Transaction Services.
For more information on the compliance characteristics of NonStop Server for Java 5,
and about ensuring portability of Java programs to and from NonStop Server for Java,
see NonStop Server for Java (NSJ) Programmers Reference.
Servlet and NSJSP Examples and References
Once you install and start the servlet container, you can access the NSJSP Sample
page from a web browser at URL:
http://hostname:portnumber/servlet_jsp/
For information on interfaces, classes, and methods of the Servlet APIs and JSP APIs,
refer http://java.sun.com/products/servlet/.
If you are migrating from an earlier release of Java servlets, you must check the API
specification to ensure that any methods or interfaces you have used in the past have
not been deprecated. For information on migrating from NSJSP 5.0, see Migrating to
NSJSP 6.0 on page 7-1.
Using the Servlet API
The servlet API includes interfaces, classes, and methods that structure the interaction
between a servlet and a web client. These classes facilitate servlet usage.
The HttpServlet Class
This class extends the GenericServlet class by overriding the service
(ServletRequest, ServletResponse) method, which receives, processes, and
responds to a request from a web client. The HttpServlet class inherits the
init(ServletConfig) and destroy() methods from the GenericServlet
class.
When you write a servlet for the iTP Secure WebServer environment, it must extend
the GenericServlet class or the HttpServlet class; the HttpServlet class is
preferable for the web environment because it includes many features supporting the
HTTP protocol. Your servlet must override the: