From the first chapter of the JSP & Servlet Learning notes, learn about the Web container: "The Web container is the only HTTP server that servlet/jsp knows."
In Java, there are several types of containers, and here is the Web container, where he has the following location on the entire servlet request route:
Java developers are generally using Tomcat as a Web server, but from the fact that there is a difference between the HTTP server and the Web container, can tomcat be an HTTP server or a Web container? If Tomcat is just a web container, what is the corresponding HTTP server on his chain? in this connection, I found an explanation on the internet, and I felt that it was quite good, excerpts from the following: http://www.bitscn.com/netpro/server/201007/188521.html
Apache is the world's most used Web server software. It can run on almost all widely used computer platforms and is one of the most popular Web server-side software due to its widespread use across platforms and security. Apache Server in the Apache Foundation will always be given the greatest support, after all, the oldest son of the most pro, and Apache's Open source Server software Tomcat is also worth attention, after all, Tomcat is open source free products, users will give maximum support. But often when using Apache and Tomcat and other these servers, you always feel unclear what the relationship between them, when using Tomcat always appear Apache, always confused, who is the Lord who is the time, so deliberately on-line query Some of this information, summed up a bit.
parsing one:
Apache supports static pages, and Tomcat supports dynamic, such as Servlets ,
For general use of Apache+tomcat, Apache is just a forwarding, and the processing of JSPs is handled by Tomcat.
Apche can support Phpcgiperl, but to use Java, you need Tomcat to support the Apache backend, and the Java request will be forwarded to Tomcat for processing by Apache.
Apache is a Web server, Tomcat is an application (Java) server, it is just a servlet (JSP also translated into a servlet) container, can be considered an Apache extension, but can be run independently of Apache.
These two can be compared in the following points:
both are developed by the Apache organization.
both have the functionality of the HTTP service
both are free.
different points:
Apache is dedicated to providing HTTP services, and related configuration (such as virtual host, URL forwarding, etc.)
Tomcat is a JSP server developed by the Apache organization in the Java EE-compliant JSP, servlet standard.
parsing two:
Apache: Focus on HTTP Server
Tomcat: Focus on the servlet engine, if run in standalone mode, functionally equivalent to Apache, support JSP, but not ideal for static web pages;
Apache is a Web server, Tomcat is an application (Java) server, it is just a servlet (JSP also translated into a servlet) container, can be considered an Apache extension, but can be run independently of Apache.
in other words, Apache is a truck that can be loaded with something like HTML. But you can't put water, you have to have a container (a bucket) to fill it, and this bucket is not on the truck.
Summary
Overall, Tomcat may never be the most important product of Apache, but no one can prevent Tomcat from becoming a mainstream product, and Apache will also give considerable attention to the youngest son.
Learn the difference between java--jsp and Servlet--tomcat and Apache from 0 onwards