码迷,mamicode.com
首页 > 其他好文 > 详细

What is Servlet Container

时间:2015-06-06 14:53:14      阅读:101      评论:0      收藏:0      [点我收藏+]

标签:

What is Servlet Container

Normal Java application’s starting point is Main(public static void main(String args[])) method. When ever java application needs to start, main method of the application should be invoked. But in case of Servlet this is not true, Servlet doesn’t contain any main method. So who will initiate and run the method of Servlet. It’s Container who has the full control of Servlets. Tomcat is the example of Servlet container.

How it works

When ever user request for any resource from Server Web server(Apache) will pass the request to Servlet Container(Tomcat) instead of directly to servlet. It is container who will create request and response Object and then pass it to Servlet eligible for asked resource and invoke service method of Servlet.

Services Provided by Container

  • Communication Support
  • Servlet Life cycle management
  • MultiThreading Support
  • JSP Support

What is Servlet Container

标签:

原文地址:http://www.cnblogs.com/hephec/p/4556595.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!