标签:
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.
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.
标签:
原文地址:http://www.cnblogs.com/hephec/p/4556595.html