views:

437

answers:

3

Hi,

I've a small doubt in my mind; could anyone please clarify me is the Tomcat web server or Web container?

+6  A: 

It's both a web server (supports HTTP protocol) and a web container (supports JSP/Servlet API, also called "servlet container" at times).

BalusC
A: 

A web server is any program that accepts incoming HTTP connections.

Chad Okere
+2  A: 

As mentioned above, Tomcat is both a web server and a web container, but it's not really meant to function as a high performance web server, nor does it include some features typical of a web server. Tomcat is meant to be used in conjunction with the Apache web server, where Apache manages static pages, caching, redirection, etc. and Tomcat handles the container (web application) functions. You'll often hear the phrase "Apache Tomcat" together, which is both a proper attribution of the Tomcat project (as part of the Apache Foundation), but also appropriate as a label, as they're usually used together as a package.

If you don't have an high performance server requirements and/or want to embed a relatively simple web server with container functionality, Tomcat is fine for that (and probably the easiest embedded web container to work with, comparable with Jetty). Interestingly, the Catalina class used as the main Tomcat engine is actually a subclass of the Embedded class that can be used in a standalone web application.

Ichiro Furusato