NonStop Servlets for JavaServer Pages (NSJSP) 5.0 System Administrator's Guide
Overview and Architecture
NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide—525644-003
1-11
An Example of JSP Code
An Example of JSP Code
Example 1-1 on page 1-11 shows the use of templating, a common technique used in
web-page development, which uses the services of more than one servlet. In this
example, the template is coded as JSP using the include directive to reference some
HTML in another file.
NonStop Servlets for JavaServer Pages
(NSJSP) Architecture
This subsection contains background information about the NonStop Servlets for
JavaServer Pages (NSJSP) architecture. It illustrates and discusses the relationships
between HTML clients, iTP Secure WebServer processes, and the NSJSP
environment. It also describes the lifecycle of a servlet and the benefits of running
servlets in NonStop TS/MP ServerClasses.
The NSJSP implementation is a multi-threaded, out-of-process servlet container: a
Java web container (with web applications) that runs in a Java Virtual Machine (JVM)
outside of the iTP Secure WebServer HTTPD process. This architecture is shown in
Figure 1-5, iTP Secure WebServer Servlet Architecture, on page 1-12.
In essence, NSJSP provides the same JVM functionality as any other J2EE
implementation, but is unique in its ability to scale across multiple processors to
provide a scalable NSJSP computing environment.
Each web container can contain a number of applications, each with their own servlets,
JSP, and other resources. These containers are accessible by any HTTPD process
running on any processor. The containers and the HTTPD processes are part of the
NonStop TS/MP environment.
Example 1-1. JSP Code
<%-- Filename: "TemplateDemo.jsp" --%>
<HTML>
<BODY>
<CENTER> Welcome To My WebSite</CENTER>
<BR>
<P> The time is <% new java.util.Date().toString() %> </P>
<%@ include file = "Body.html" %>
</BODY>
</HTML>
_____________________________________________________________________________
The HTML file called Body is:
<BR>
<H1>
This is text that will be included in the body of the HTML in the JSP file
</H1>
<BR>










