views:

3029

answers:

4

What is the difference in terms of functionality between the Apache HTTP Server and Apache Tomcat?

I know that Tomcat is written in Java and the HTTP Server is in C, but other than that I do not really know how they are distinguished. Do they have different functionality?

+3  A: 

Found a slideshow here that details some of the differences.

Craig H
+3  A: 

Tomcat is primarily an application server, which serves requests to custom-built Java servlets or JSP files on your server. It is usually used in conjunction with the Apache HTTP server (at least in my experience). Use it to manually process incoming requests.

The HTTP server, by itself, is best for serving up static content... html files, images, etc.

levand
+11  A: 

Apache Tomcat is used to deploy your Java Servlets and JSPs. So in your Java project you can build your WAR (short for Web ARchive) file, and just drop it in the deploy directory in Tomcat.

So basically Apache is an HTTP Server, serving HTTP. Tomcat is a Servelt and JSP Server serving Java technologies.

Bernie Perez
+4  A: 

in addition to the fine answers above, i think it should be said that tomcat has its own http server built into it, and is fully functional at serving static content too. depending on your java virtual machine configuration it actually has outperformed going through traditional connectors in apache such as mod_proxy and mod_jk.

that said a fully optimized tomcat server should server static files fast and if you have java servlets, jsps and coldfusion files in addition to static content you may find tomcat does an excellent job by itself.

ethyreal