File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Apache/Tomcat - Same, different ??? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Apache/Tomcat - Same, different ???" Watch "Apache/Tomcat - Same, different ???" New topic
Author

Apache/Tomcat - Same, different ???

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

I know that Apache is a web server. And then I thought that Tomcat was also a web server. But I am confused. Is Tomcat a web server or not? Do you have to have apache to run Tomcat or not?
How do these two products differ?
Thanks.


GenRocket - A Test Data Generation Platform
Matthew Phillips
Ranch Hand

Joined: Mar 09, 2001
Posts: 2676
Tomcat is a jsp/servlet container that has a built in web server.


Matthew Phillips
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

So apache does not have servlet capabilites? So I should run Tomcat and not Apache if I want to use servlets? Is that correct?
Also, outside of servlet capabilities how does Tomcat compare feature wise with Apache. I know they are both under the same project and guidlines, but is Tomcat stripped down or is it as rich as Apache plus the Servlet/JSP services?
Or if anyone has a link that would tell me this info, that would be great.
[ May 08, 2002: Message edited by: Gregg Bolinger ]
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

Apache is both the name of the web server, and the name of the 'org' that does a whole bunch of opensource development.

Apache the web server is the well-known, full-featured webserver that runs, what, 90% of the internet?

Jakarta Tomcat (it's not really 'apache tomcat') is a product that fully implements the servlet2.3 and jsp 1.2 specifications. So it is a 'servlet container'. Also, for convenience of use, and for a 'development/educational' environment, Tomcat also includes an embedded web server.

If you wanted to use servlets or JSP's, then you would have to run *at least* Tomcat, and if you wanted it to run quickly and efficiently in a 'production' environment, you would opt for Apache + Tomcat.

If you were merely developing, or the use of the site would be minimal, you could get away with using just Tomcat for both the servlet container and the web server.
Shannon Brown
Greenhorn

Joined: May 08, 2002
Posts: 3
This can be confusing.
Apache is a web server.
Tomcat is essentially a plug-in that allows Apache to use JSP pages and servlets. As a plug in, when Apache gets a servlet/JSP request it passes the request to the Tomcat plug-in. Tomcat processes the request and then send the response back to Apache. Apache then sends the response back to your browser.
Now the confusing part. Tomcat can also be run in "stand alone" mode. In stand alone mode, Tomcat can act as both a web server (e.g., for normal HTML pages) and as a JSP/servlet processor. This stand alone mode is intended ONLY for development work. It is a nice way to do simple development and testing of JSP/servlets without requiring a full Apache installation. Many Java IDEs use a variation of Tomcat for testing JSP/servlets created in the IDE (NetBeans, Forte, JBuilder).
By default, when you install Tomcat, it will run in stand alone mode.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15286
    
    6

Thanks everyone. I think I got it now.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Apache/Tomcat - Same, different ???
 
Similar Threads
Confusion over web server and serverlet container
Apache Tomcat High Availability and Load Balancing
Tomcat on Apache?
Apache andTomcat server
difference between Apache HTTP server and Tomcat?