What is the relationship and difference between Apache and Tomcat (GO)

Source: Internet
Author: User
Tags url forwarding

often in Apache and Tomcat and so on these servers, but the total feeling still do not know what the relationship between them, when using Tomcat always appear Apache, always confused, who is the Lord who is the time, so deliberately on the Internet to check some of this information, summed up: a
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.
Apache can support Php\cgi\perl, but to use Java, you need Tomcat to support Apache in the background and transfer Java requests from Apache to Tomcat processing.
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: 1, both are the Apache organization developed 2, both have the HTTP service function 3, 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 Apache in accordance with the Java EE JSP and servlet standards .
Two:
Apache is a Web server environment program enabled he can use as a Web server but only support static web pages such as (asp,php,cgi,jsp) Dynamic Web page is not
If you want to run the JSP in the Apache environment, you need an interpreter to execute the JSP Web page and this JSP interpreter is Tomcat, why do you want the JDK? Because the JSP needs to connect to the database.

The JDK is required to provide the drive to connect to the database, so the Web server platform to run the JSP needs to APACHE+TOMCAT+JDK
the benefits of consolidation are:
If the client requests a static page, only the Apache server responds to the request if the client requests a dynamic page, then the Tomcat server responds to the request
because JSP is a server-side interpretation code, consolidation can reduce the service overhead of Tomcat
Three:
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.
Source: http://blog.csdn.net/longzs/article/details/10959945

Null

What is the relationship and difference between Apache and Tomcat (GO)

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.