您的位置:首页 > 大数据 > 人工智能

What is Servlet Container

2015-06-06 14:26 393 查看

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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: