Difference between Apache Server and Tomcat


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 7 of 7

Thread: Difference between Apache Server and Tomcat

  1. #1
    Join Date
    Nov 2006
    Location
    NEW DELHI, INDIA
    Posts
    22

    Question Difference between Apache Server and Tomcat

    Hi Friends,

    Please, can anybody tell me that what is the difference between Apache server and Tomcat.

    I know that tomcat handles dynamic contents (jsp/servlets) also the static contents (html).
    And, Apache can handle the static pages as well as CGIs.

    Any other difference, can anybody tell me.

    thanks,
    abhi
    Thanks,
    abhi

  2. #2
    Join Date
    Feb 2007
    Posts
    35
    Apache server is a web server, just like IIS that can host not only static pages, but also PHP, perl, etc.
    Tomcat is a servlet container (JSP is actually a servlet), supposed to be plugged in a web server (so that you can plug it in IIS or of course, Apache, though I never tried it). But then when you download Tomcat, you get like an independent web server coming with it (I guess it's coming with a subset of Apache), that sometimes confuse people. But really, I found it's more practical than confusing cause most of the time, it's just good enough (instead of getting the full Apache), e.g: if your web server is intended only using JSP/Servlet and you don't care about PHP support.
    So, Apache (by default) won't be able to host Servlet, unless you have Tomcat on top of it (or other servlet container, Tomcat is not the only one, though most people use it).
    Hope I don't add anymore confusion

  3. #3
    Join Date
    Nov 2006
    Location
    NEW DELHI, INDIA
    Posts
    22
    thanks hanofee!!

    can u, plz, tell me the funcationality of apache server that is not common to both apache server and tomcat.
    Thanks,
    abhi

  4. #4
    Join Date
    Feb 2007
    Posts
    35
    As I know, Tomcat (without anything else) can only be used as web server to host Servlet (with static HTML, as it's the minimum) and can't be used to host PHP, perl or whatever other technology out there.
    Apache is really powerful (that's why it's the most popular web server) and can be used to host anything you want (though probably you need to add the correct 'plugin').
    If you stick with Java only (Servlet/JSP), go to Tomcat as it's easier and lighter (you can always 'upgrade' it to full Apache later on, if necessary).

  5. #5
    Join Date
    Nov 2006
    Location
    NEW DELHI, INDIA
    Posts
    22
    I found few more general points as follows.....

    1. Tomcat is not as fast as Apache when it comes to static pages.
    2. Tomcat is not as configurable as Apache.
    3. Tomcat is not as robust as Apache.
    4. Tomcat may not address many sites' need for functionality found only in Apache modules (e.g. Perl, PHP, etc.).

    For all these reasons it is recommended that real-world sites use an industrial-strength web server, such as Apache, for serving static content, and use Tomcat as a Servlet/JSP add-on.
    Thanks,
    abhi

  6. #6
    Join Date
    Feb 2007
    Posts
    35
    All agree, except you probably have to think further about no 2:
    "Tomcat is not as configurable as Apache"
    It's true but it makes Tomcat easier to configure. And don't forget if your need is only to run Servlet/JSP but you want to use Apache, you'll double your work by configuring Apache and Tomcat at once.
    Again, decide carefully depend on what you need. Tomcat is probably not as fast or as robust as Apache, but it's reasonably good unless you're running big web server with thousands request hitting in seconds (I had mid-size web server running in real industry with Tomcat, without any performance nor stability issue). Apache is certainly the best, but you have to pay the price in configuration and maintenance.
    Good luck

  7. #7
    Join Date
    Dec 2005
    Posts
    48
    Apache Tomcat is the servlet container that is used in the official Reference Implementation for the Java Servlet and JavaServer Pages technologies
    The Apache HTTP Server is a collaborative software development effort aimed at creating a robust, commercial-grade, featureful, and freely-available source code implementation of an HTTP (Web) server

Similar Threads

  1. Replies: 2
    Last Post: 04-18-2007, 03:34 AM
  2. Replies: 0
    Last Post: 01-09-2006, 03:50 PM
  3. integrating Tomcat with Apache
    By ashiers in forum Open Source
    Replies: 0
    Last Post: 11-16-2005, 07:34 PM
  4. Apache Webserver and Tomcat
    By Raymond Monroe in forum Java
    Replies: 0
    Last Post: 10-27-2001, 10:41 AM
  5. Replies: 0
    Last Post: 10-13-2000, 10:32 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center