• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Apache/Tomcat - Same, different ???

 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Matthew Phillips
Ranch Hand
Posts: 2676
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat is a jsp/servlet container that has a built in web server.
 
Gregg Bolinger
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 15304
6
Chrome IntelliJ IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks everyone. I think I got it now.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic