The Tomcat server is a free open source Web application server. Because of its advanced technology, stable performance and free, it has been favored by Java enthusiasts and has been recognized by some software developers, becoming a popular Web application server.
One, Tomcat and application server
So far, Tomcat has been considered the executor of the Servlet/jsp API, as well as the so-called servlet container. However, Tomcat does not only do this, it also provides the implementation mechanism for JNDI and JMX APIs. However, Tomcat is still not an application server because it does not provide support for most of the Java EE APIs.
Interestingly, many application servers today often use Tomcat as a container for their servlet and JSP APIs. Because Tomcat allows developers to embed tomcat into their applications simply by adding a line of acknowledgements. Unfortunately, many commercial application servers do not comply with this rule.
For developers, choosing Tomcat is a great solution if you're looking to build Java Web applications using servlet, JSP, Jndi, and JMX Technologies, but to find support for other EE APIs, Finding an application server or using Tomcat as an application server is a good solution, and the third Way is to find a separate Java EE API implementation and then combine them with Tomcat. Although consolidation can bring about problems, this approach is most effective.
Ii. Tomcat vs. Web server
Tomcat is a container that provides support for Servlets and JSPs to run. Servlets and JSPs can generate dynamic Web content based on real-time needs. For Web servers, Apache only supports static web pages, and it is powerless to support dynamic Web pages, while Tomcat can serve dynamic Web pages and support static Web pages. Although it is not as fast as the usual Web server, it is not as rich as the Web server, but Tomcat is gradually expanding to support static content. Most Web servers are written in the underlying language, such as C, and take advantage of the features of the corresponding platform, so Tomcat execution speed written in plain Java is unlikely to be comparable to them.
In general, the large site is a combination of Tomcat and Apache, Apache is responsible for accepting all HTTP requests from the client, and then forwarding Servlets and JSP requests to Tomcat for processing. After Tomcat finishes processing, the response is passed back to Apache, and the final Apache returns the response to the client.
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.
2010-01-06
This article is from the "Five Corners" blog, please be sure to keep this source http://hi289.blog.51cto.com/4513812/1764629
An explanation of the relationship between Tomcat and Apache