NonStop Servlets for JSP System Administrator's Guide
Overview and Architecture
NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide—525644-001
1-7
Model-View-Controller Designs
JSP page is requested the first time. The result is a JSP page implementation class file
that implements the Servlet interface.
The JSP page implementation class file extends HttpJspBase, which in turn
implements the Servlet interface. The service method of this class, _jspService(),
essentially inlines the contents of the JSP page. Although the _jspService cannot
be overridden, you can effect initialize and destroy events by providing
implementations for the jspInit() and jspDestroy() methods within your own
pages. When the class file is loaded within the web container, the _jspService()
method is responsible for replying to a client request. By default, the _jspService()
method is dispatched on a separate thread by the web container in processing
concurrent client requests.
Model-View-Controller Designs
There are two design philosophies for JSP usage. The approaches differ in terms of
where most of the processing takes place. In the first approach, shown in Figure 1-3, A
Basic NSJSP Model, the incoming request from a web browser is sent directly to the
JSP page that is responsible for processing it and replying back to the client. Content
is separated from presentation because data access is performed using Java Beans.
This approach is fine for simple applications, but requires that all request processing
occur in the JSP page, making each page individually responsible for managing
application state, verifying authentication, and maintaining security.
Figure 1-3. A Basic NSJSP Model
VST904.vsd
JSP
Java Bean
or Java Servlet
CLIENT
BROWSER
WEB CONTAINER
2
3
Data Storage
REQ
RES
1
4