> From: Gogia Nitin [mailto:[EMAIL PROTECTED]]
> What's the use of using Apache With Tomcat when Tomcat itself can
> service all the requests for servlets ?

I just put in production a JSP app running on top of TomCat alone.  We had
considered using Apache, but because nearly 100% of the pages are
dynamically served and the webserver is dedicated to this application, it
was better to just set up TomCat for port 80 and forget about Apache.

You want to combine TomCat to a full-featured webservfer like Apache if:

1) You have a significant volume of static content.  Apache will probably be
   more efficient here (I don't think TomCat will even cache static
   HTMLs/images).
2) You need advanced features, like those provided by Apache modules, which
   are not available in TomCat's basic webserver.
3) You worry about security.  Apache is recognized as a robust, secure
   server. TomCat is very new and it might have security bugs/backdoors.
   My app is in the intranet, so I don't care -- no kids trying to steal
   data, replace the homepage with some porn, or put it down with DoS.
4) The webserver will handle multiple web sites/applications, and TomCat is
   not ideal for all of them.

On the other hand, using only TomCat is more efficient for dynamic content
(because you skip an expensive routing of everything through Apache) and
it's one thing less to install and admin.

Now, the following is inaccurate:

From: "peter" <[EMAIL PROTECTED]>
> OK here is an attempt
> Apache provides the basic tcp/ip protocol stack to service web
> request/response
> Tomcat provides a specific protocol for servlet /jsp communication and
> is built on top of apache(an additional application layer
> protocol).Without apache the lower layers would be missing and tomcat
> will not be able to communicate to the network.
> Please point out any inaccuracies or mistakes you may find that way we
> all learn.

TomCat serves HTTP directly, it doesn't need Apache at all.  TomCat (just
like other servlet engines) can communicate with Apache (or other full-
featured httpd's) through a bridge.  For TomCat/Apache, the bridge is the
JServ module that you put in apache.  It's the bridge that uses a special
protocol or binary interface, so the webserver an servlet engine might
pipe requests and responses back and forth.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to