Chapter 1: Apache Tomcat While Tomcat is capable
Chapter 1: Apache Tomcat While Tomcat is capable of serving dynamic and static content, many production deployments use a native Web server, such as Apache HTTP Server or IIS, to handle the static content. There are many reasons for choosing to do this, some of which relate to performance and others relate to support of legacy code. Chapters 11 and 12 address these issues in greater detail. Recognizing that Tomcat could enjoy a synergistic relationship with conventional Web servers, the earliest versions of Tomcat included a Connector that enabled a Tomcat and Apache Web server to work together. In such a relationship, Apache receives all of the HTTP requests made to the Web application. Apache then recognizes which requests are intended for Servlets/JSPs, and passes these requests to Tomcat. Tomcat fulfills the request and passes the response back to Apache, which then returns the response to the requestor. The Apache Connector was initially crucial to the Tomcat 3. x series, because Tomcat s support for both static content and its implementation of the HTTP protocol were somewhat limited. Starting with the 4.x series, Tomcat featured a much more complete implementation of HTTP and better support for serving up static content, and should by itself be sufficient for most deployments. If you re not using either Apache or IIS or any other Web server officially supported by Tomcat, then don t give up hope entirely. It is still very possible to integrate Tomcat with other Web servers, even one that resides on the same machine. If you wish to run them on the same machine for instance, all you have to do is to set up Tomcat and the Web server to run on different network ports. You then can then design your Web application to request its static resources from the Web server, and have Tomcat handle the requests for dynamic content. In many situations it might be simpler to just use Tomcat s own Web server implementation. Tomcat has an HTTP Connector i.e., a component that implements an HTTP server. More on this, including when it makes sense to use this, and when a native Web server is a better choice, is explained in Chapter 10 . Summary To conclude this chapter overview of Tomcat, let s review some of the key points we discussed: . The Apache Software Foundation (ASF) is a nonprofit organization created to provide the world with quality open source software. . The ASF maintains an extensive collection of open source projects. Many of the ASF s Java projects are collected under the umbrella of a parent project called Jakarta. . Tomcat started as a subproject of the Jakarta project, but now is independent of it. . Tomcat can be freely used in any organization. It can be freely redistributed in any commercial project so long as its license is also included with the redistribution and proper recognition is given.
For high quality website hosting services please check tomcat web hosting website.