Apache vs Tomcat ? What's the difference?

Posted on 2005-04-18
Medium Priority
Last Modified: 2013-11-24

I need to understand clearly what is the difference between Apache and Tomcat?

So far I understand, that Apache is the HTTP server and the Tomcat is the web container?

Could you clarify the difference with more concrete concepts?

If I am to use Microsoft technology for this same type of tasks as with Apache and Tomcat, what are the equivalents?

I have worked with ASP.NET, and IIS, but I just don't get it?

Isn't IIS the Web Server as the Apache is?
Then what is the other part that is equivalent to Tomcat?

Question by:_Esam
  • 3

Accepted Solution

Hous68 earned 280 total points
ID: 13812003
Apache is a webserver, capable of serving static webpages.
In this situation, it is analgous to IIS.
Apache, like IIS (ASP-VBScript, ASP-JScript), has the ability to execute scripting languages through the use of modules (mod_php, mod_perl, etc.).

Tomcat is a servlet container, capable of serving, well... servlets.  One could say that Tomcat is an application server.
Tomcat runs Java servlets, JSPs, and other Java specific technologies.
You could equate Tomcat to the .NET CLR.

Unlike IIS and .NET, you don't need Apache to run Tomcat.  Tomcat is capable of serving up static html pages, but that's not what it was built for.  Tomcat, by default, listens on port 8080, but that can easily be changed to the standard web port, 80, and appear to anyone on the outside as a simple webserver.
LVL 16

Assisted Solution

suprapto45 earned 120 total points
ID: 13812005

Please read the materials that I extracted from my books.

Tomcat's purpose is to provide standards-compliant support for servlets and JSP pages. The purpose of servlets and JSP pages is to generate web content such as HTML files or GIF files on demand using changing data. Web content that is generated on demand is said to be dynamic. On the other hand, web content that never changes and is served up as-is is called static. Web applications commonly include a great deal of static content, such as images or Cascading Style Sheets (CSS).

While Tomcat is capable of serving both dynamic and static content, it is not as fast or feature-rich as the Apache web server with regard to static content. While it would be possible for Tomcat to be extended to support the same features that Apache does for serving up static content, it would take a great deal of time; Apache has been under development for many years. Also, because Apache is written entirely in C and takes advantage of platform-specific features, it is unlikely that Tomcat, a 100% Java application, could ever perform well as Apache.

Recognizing that the advantages of Apache would complement the advantages of Tomcat, the earliest versions of Tomcat included a connector that enabled Tomcat and Apache to work together. In this arrangement, Apache receives all of the HTTP requests made to the web application. Apache then recognizes which requests are intended for servlets/JSP pages, and passes these requests to Tomcat. Tomcat fulfils the request and passes the response back to Apache, which then returns the response to the requestor.

The Apache connector was initially crucial to the Tomcat 3.x series, because its support for both static content and its implementation of the HTTP protocol were somewhat limited.

The Tomcat 4.x series, however, features a much nicer implementation of HTTP and better support for serving up static content, and should by itself be sufficient for people who aren't looking to max out performance but simply need HTTP standards compliance. However, as mentioned above, Apache will most likely always have superior performance and options when it comes to serving up static content and communicating with clients via HTTP, and, for this reason, anyone who is using Tomcat for high-traffic web applications may want to consider using Apache and Tomcat together.


i will try to answer the rest of your questions soon.

Best Regards
LVL 16

Expert Comment

ID: 13812013

Apache is the webserver and Tomcat is the application server. You can also integrate Tomcat with IIS and etc.

LVL 16

Expert Comment

ID: 13812016

Well, I think that Hous68 has covered the Microsoft terms for Apache - Tomcat. Great answer House68.


Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
In this post we will learn different types of Android Layout and some basics of an Android App.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month4 days, 19 hours left to enroll

601 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question