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

Overview and Architecture
NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide525644-003
1-4
JavaServer Pages (JSP)
JavaServer Pages (JSP)
JavaServer Pages (JSP), a presentation-layer technology that sits on top of the Java
servlets model, simplifies the creation and management of dynamic HTML. JSP uses a
component-based rather than a page-based approach to development. In page-based
design, the web page combines the presentation material usually created by designers
with the business logic usually created by programmers.
By separating the user interface from content generation, JSP allows page designers
to change the page layout without altering the underlying programmable dynamic
content. Furthermore, the programmable content, or business logic, can be written in
the form of reusable components such as Java Beans. This separation of the page
logic from its display and the support for a reusable component-based design makes
JSP a fast and easy way to build web-based applications.
JavaServer Pages use XML-like tags and scriptlets written in the Java programming
language to encapsulate the logic that generates the content for the page. Additionally,
the application logic can reside in server-based resources, Java Beans, that the page
accesses by using these tags and scriptlets. All formatting (HTML or XML) tags are
passed directly back to the response page. The underlying JSP engine (actually a
specialized servlet itself) transforms JSP tags, scriptlets, and HTML into Java code
which is organized as a Java servlet. This servlet is compiled as Java bytecode, so the
page does not need to be interpreted every time it is requested. The code is
recompiled automatically if the page is changed. A high-level view of JSP is shown in
Figure 1-2, JSP Data Flows, on page 1-5.
Figure 1-1. A J2EE Web Container With Two Applications
VST901.vsd
WEB CONTAINER
APPLICATION # 2
JAVA
SERVLETS
DEPLOYMENT
DESCRIPTOR
JAVA
CLASSES
JSP
PAGES
APPLICATION # 1
JAVA
SERVLETS
DEPLOYMENT
DESCRIPTOR
JAVA
CLASSES
JSP
PAGES