Whereas servlet container would be responsible for compiling the servlet using the javac and then executing the class file. The output of the servlet excution would be routed to the HttpServer which would send it as a response to the client.
Hope this helps.
[ January 25, 2005: Message edited by: Paul Sturrock ]
HTTP is the Hypertext Transport Protocol. Both Apache and Tomcat will accept HTTP requests.
The difference is that Apache is JUST an HTTP server. It serves up static HTML pages.
Tomcat has an HTTP listener inside it, but in addition to that it has a servlet/JSP engine. It can serve up both static and dynamic HTML pages.
You can use Tomcat without Apache.
Apache cannot handle servlet/JSP requests without having a servlet/JSP engine bolted on top of it.
Apache has set of projects in which HTTP (web) Server and jakarta are two names of the projects. jakarta deals with java-related efforts.
Under jakarta, we have Tomcat,Struts,Ant,Log4J and other ....
Tomcat's purpose is to provide standards-compliant support for servlets and JSP pages. The purpose of servlets and JSP pages is to generate web content such as HTML files or GIF files on demand using changing data. Web content that is generated on demand is said to be dynamic. On the other hand, web content that never changes and is served up as-is is called static.
While Tomcat is capable of serving both dynamic and static content, it is not as fast or feature-rich as the Apache web server with regard to static content. While it would be possible for Tomcat to be extended to support the same features that Apache does for serving up static content, it would take a great deal of time;
Apache has been under development for many years. Also, because Apache is
written entirely in C and takes advantage of platform-specific features, it is unlikely that Tomcat, a 100% Java application, could ever perform well as Apache.
The earliest versions of Tomcat included a connector that enabled Tomcat and Apache to work together. In this arrangement, Apache receives all of the HTTP requests made to the web application. Apache then recognizes which requests are intended for servlets/JSP pages, and passes these requests to Tomcat.Tomcat fulfils the request and passes the response back to Apache, which then returns the response to the requestor.
However, as mentioned above, Apache will most likely always have superior performance and options when it comes to serving up static content
and communicating with clients via HTTP, and, for this reason, anyone who is using Tomcat for hightraffic web applications may want to consider using Apache and Tomcat together.