You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by R....@cvitkovic-ac.fr on 2001/10/19 13:02:38 UTC

Réf. : I'm using Tomcat, do I also need Apache

Tomcat is used to serve servlets and JSPs. It can also serve static
content, but not as good as Apache.
The decision to use both depends on your site and needs.. if you'll run 99
dynamic pages out of 100 pages of your site, it would be silly to use
Apache as well..
but if your site is mainly static, and you have a couple of dynamic pages
hanging around, you'll get much better performances by using Apache and
Tomcat.
As the guys from Jakarta say: the best way to know which one is better for
you, is to try both...

---------------------------------------------------
Raul Davidovich
Responsable Informatique
Cvitkovic & Associés Consultants

(33) 1 45 15 40 68
(33) 1 45 15 40 41 Fax
-------------------------------------------------------
http://www.caconcology.com


|--------+----------------------->
|        |          dave.prout@bt|
|        |          .com         |
|        |                       |
|        |          19/10/2001   |
|        |          12:30        |
|        |          Veuillez     |
|        |          répondre à   |
|        |          tomcat-user  |
|        |                       |
|--------+----------------------->
  >-------------------------------------------------------------------------------------------------------------------------------------|
  |                                                                                                                                     |
  |       Pour :  tomcat-user@jakarta.apache.org                                                                                        |
  |       cc :                                                                                                                          |
  |       Objet :      I'm using Tomcat, do I also need Apache                                                                          |
  >-------------------------------------------------------------------------------------------------------------------------------------|




Hi all,

           I'm using Tomcat 4.0 for my WebSite. Is there any point in also
using Apache ? A lot of people seem to use both, but why ?

Dave





Re: Réf. : I'm using Tomcat, do I also need Apache

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Fri, 19 Oct 2001 R.DAVIDOVICH@cvitkovic-ac.fr wrote:

> Date: Fri, 19 Oct 2001 13:02:38 +0200
> From: R.DAVIDOVICH@cvitkovic-ac.fr
> Reply-To: tomcat-user@jakarta.apache.org
> To: tomcat-user@jakarta.apache.org
> Subject: Réf. : I'm using Tomcat, do I also need Apache
>
>
> Tomcat is used to serve servlets and JSPs. It can also serve static
> content, but not as good as Apache.

Be *very* careful with stating this in absolute terms :-).  While it was
for the most part true in the past, modern JVMs and improvements have
closed the gap in many cases -- and in at least some other cases it is not
relevant anyway.

Consider a mostly-dynamic app that has a few static images for your logo,
button images, and such.  The browser will cache those images the first
time they are requested.  After that (when the user goes back to the same
page), the browser will do "conditional GET" requests, to re-download the
image only if it has changed.  The server can return a "not modified"
response if nothing has changed, and save the time to download the image
for each request.

Tomcat implements the "not modified" feature.  And, in many situations
(running directly from a WAR, or current versions of Tomcat on Unix
platforms), the check for whether a file has been modified can be done
with zero disk I/Os -- so the speed with which the actual file is served
is not relevant at all.

> The decision to use both depends on your site and needs.. if you'll run 99
> dynamic pages out of 100 pages of your site, it would be silly to use
> Apache as well..
> but if your site is mainly static, and you have a couple of dynamic pages
> hanging around, you'll get much better performances by using Apache and
> Tomcat.

Another good reason to use Apache would be if you need other functionality
that it provides.

> As the guys from Jakarta say: the best way to know which one is better for
> you, is to try both...
>

And *that* is the correct answer.  :-)

> Raul Davidovich

Craig