NonStop Servlets for JSP System Administrator's Guide
Overview and Architecture
NonStop Servlets for JavaServer Pages (NSJSP) System Administrator’s Guide—525644-001
1-3
The Web Container
The Web Container
For building and running web-based applications, J2EE provides a web container, a
Java runtime environment that has the following content:
•
The applications, including Java Servlets and JavaServer Pages, class libraries,
resources such as HTML or XML documents, and images.
•
The Servlet API and runtime management including initializing, invoking, and
managing the Servlet and JSP lifecycles.
•
The deployment descriptors (the web.xml file) that contain resource definitions
such as MIME types, mapping of requests to servlets, access control and servlet
initialization parameters.
It is the web container’s responsibility to instantiate the servlet and provide the
communication between the iTP WebServer and the servlet. The container provides
the following services:
•
Instantiate the servlet
•
Invoke the servlet’s init() method
•
Request services from the user by invoking the service() method
•
Invoke the destroy() method when the servlet is to be garbage-collected
•
Manage a similar lifecycle for JSP files
•
Deploy and create WAR (web archive) files
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