What is the difference between Apache and Tomcat, and why integrate Apache and Tomcat?

Source: Internet
Author: User
1. Apache is a Web server, Tomcat is an application (Java) server, it is just a servlet container, is an Apache extension.

2. Apache and Tomcat can be run as standalone Web servers, but Apache cannot interpret Java programs (Jsp,serverlet).

3. Apache is an ordinary server, which itself only supports HTML as a normal Web page. However, PHP can be supported via plugins and can be connected to Tomcat (one-way Apache connection Tomcat, which means that Tomcat resources can be accessed through Apache.) otherwise)

4. Both are a kind of container, but publish something different: Apache is an HTML container, functions like IIS, Tomcat is a jsp/servlet container for publishing JSP and Java, similar to IBM Webshere, EBA WebLogic, Sun's jrun and so on.

5. Apache and Tomcat are independent and can be integrated on a single server.

An analogy: Apache is a truck that can hold something like HTML. But the water must be filled with containers (buckets), and Tomcat is a bucket (a water like Java), and the bucket can be kept out of the truck.

Apache only supports static Web pages, but dynamic Web pages like asp,php,cgi,jsp need to be handled by Tomcat.

Apache and Tomcat consolidated use: If the client is requesting a static page, only the Apache server responds to the request, or if the client requests a dynamic page, the Tomcat server responds to the request, because the JSP is the server-side interpretation code, This consolidation can reduce the service overhead of Tomcat.

What is the difference between Apache and Tomcat, and why integrate Apache and Tomcat?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.