Apache and Tomcat relationships

Source: Internet
Author: User

Both Apache and Tomcat are server software that provides Web services. But many people have a connection to the two, whether the two are the same thing, whether they are dependent on such problems such as difficult to answer, or even confuse the two. As a developer, I also have the same confusion, today consulted a lot of information, the information posted, for learning to use.

1. What is Apache?

Apache is an open source Web server product, most of it is written in C (you directly understand to write in C language). The world's number one Web server for use. In addition, Apache is also the name of an open source Software Foundation, which manages many open source projects, including the Web server software called Apache.


2. What is Tomcat?

Tomcat is also an open source Web server product, written in the Java language. As with Apache servers, Web services are provided, but Tomcat is primarily used to host server-side processing scripts such as JSP, CGI, and to provide a running environment, process client requests, and then output HTML back to the user. This type of Web site that dynamically loads data (data that can be changed) on the server and back to the client browser is called a Dynamic Web site or a dynamic Web page. In contrast, there is a kind of static Web page, that is, the data does not change the page or Web site, such pages are mostly HTML or HTML file collection.

A little more. The Tomcat project is also linked to the Apache Open Source Software Foundation, which is co-maintained and developed by the core team and programmers around the world as a project.


3, Apache vs Tomcat comparison

Same point:

Both Apache and Tomcat are Web servers that support cross-platform, open-source projects

Apache and Tomcat belong to the Apache Open Source Software Foundation project and run on many servers around the world.

Different points:

Apache server is written in C language, its main focus is the parallel capability and load balancing, Tomcat server is written in Java, mainly focus on as a servlet container, to do background dynamic processing, by Java and JRE processing.

The Apache server supports only static page request processing and does not support Dynamic Web page processing. To complete dynamic processing, it must be dynamically loaded into the Apache extension interface for invocation via a plug-in or as an Apache extension module at boot time. While Tomcat supports dynamic web processing, using CGI or Java, we use more Java, so most of the time when it comes to Tomcat we can think of JSP.


4. Analysis and explanation

Apache mainly provides static page processing, for dynamic page processing such problems, many of which are as part of their extension by other languages or third-party plug-ins control. You can think of this, Apache provides a relay, the different data requests distributed to the corresponding modules, PHP request sent to the corresponding PHP module, CGI request to create a process and invoke the CGI script, when the corresponding module finished processing, will be returned as output to Apache server, The Apache server then returns these results (HTML pages) to the client browser.

While Tomcat is also a server (where we only discuss implementations as Java servlet containers), you can only accept requests for JSPs. Tomcat is implemented in accordance with the JSP and Servlet standards published by the Java EE, fully supporting both standards and being implemented as a servlet container. When Tomcat receives a JSP page request, it first uses Tomcat to parse, get the corresponding parameters, then find the corresponding servlet route, then call the corresponding method in the Servlet interface (Get, Post, Delete, put, etc.), Handle the data returned by the client or request the action, and finally get output, return to Tomcat,tomcat and then use JSP render HTTP, return to the client browser.


This article is from the "high-tech blog" blog, please be sure to keep this source http://gaopengju.blog.51cto.com/12830710/1946265

Apache and Tomcat relationships

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.