Communication Support – Container provides easy way of communication between web server
and the servlets and JSPs. Because of container, we don’t need to build a server socket to listen
for any request from web server, parse the request and generate response. All these important and
complex tasks are done by container and all we need to focus is on our business logic for our
applications.
Lifecycle and Resource Management – Container takes care of managing the life cycle of
servlet. Container takes care of loading the servlets into memory, initializing servlets, invoking
servlet methods and destroying them. Container also provides utility like JNDI for resource
pooling and management.
Multithreading Support – Container creates new thread for every request to the servlet and
when it’s processed the thread dies. So servlets are not initialized for each request and saves time
and memory.
JSP Support – JSPs doesn’t look like normal java classes and web container provides support for
JSP. Every JSP in the application is compiled by container and converted to Servlet and then
No comments:
Post a Comment