In this article, you will be taken to information on everything you need to know about Apache Tomcat. Read on.
What is Apache Tomcat? Essentially, Apache Tomcat refers to an open-source Java servlet and Java Server Page container that allows developers to implement a range of enterprise Java applications. Moreover, the Apache Tomcat also runs an HTTP web server environment where Java code can run.
What else should you know about Apache Tomcat? Three years after the original launch of Java in 1995, Sun Microsystems architect James Duncan Davidson was able to develop an open-source servlet reference implementation for the first Java Servlet API. Java servlets pertain to small Java programs that define how responses and requests are handled by servers. A developer would write their servlet or JSP and let the Apache Tomcat conduct all of the routing and backend work.
Twenty-two years after the original release of Java, the Apache Tomcat has been a leading top-level project at the Apache Software Foundation and has been downloaded over 10 million times. It has a large diverse penetration across the data center with a wide range of use cases which you will get to know a little bit later on.
A host of developers in its community maintains Tomcat, and its current most stable version is series 9.0, which is the first Apache Tomcat release to support the specifications for Servlet 4.0. The Apache Tomcat also comes with the Coyote engine, a web server that lets developers connect a range of Java enterprise applications and capabilities.
The History Of Apache Tomcat
The Apache Tomcat started off as a servlet reference implementation by Sun Microsystems software architect James Duncan Davison. This architect then later helped make the project open-course and performed a key role in its donation by Sun Microsystems to the Apache Software Foundation. The Apache Ant software build automation tool was formed as a side-effect of the creation of the Apache Tomcat as an open-source project.
James Duncan Davidson had initially hoped that the project would be open-sourced, and, since many open-sourced projects had O’Reilly books associated with them featuring an animal on the cover, he aimed for the name of the project after an animal.
He came up with “Tomcat” since he said the animal represented something that could fend for itself. Though the tomcat was already in use for another O’Reilly title, he wanted to see an animal cover, which eventually came true when O’Reilly published their Tomcat book with a snow leopard on the cover back in 2003.
Apache Tomcat Components
The Apache Tomcat 4.x was launched with Catalina, a servlet container; Coyote, an HTTP connection; and Jasper, a JSP engine. Here are the details about the components of Tomcat.
Catalina is known as the servlet container of Tomcat. This implements the specifications of Sun Microsystems for servlet and JavaServer Pages or JSP. In Tomcat, a Realm element represents a “database” consisting of usernames, passwords, and roles, similar to Unix groups, assigned to those users.
Various implementations of Realm allow Catalina to get integrated into environments where such authentication information is already being created and maintained, and then use this information to carry out Container-Managed Security as described in the Servlet Specification.
The next component of the Apache Tomcat is Coyote. This refers to a Connector component for the Apache Tomcat supporting the HTTP 1.1 and 2 protocol as a web server. It allows Catalina, nominally a Java Servlet or JSP container, to also act as a plain web server that serves local files, for one, HTTP documents.
Coyote listens for incoming connections to the server on a specific TCP port and forwards this request to the Tomcat Engine to process the request, prior to sending back a response to the requesting client. There is another Coyote Connector, that is, Coyote JK, that listens similarly but instead forwards the requests to another web server, such as Apache, utilizing the JK Protocol. This usually offers better performance.
Jasper pertains to the JSP Engine of the Apache Tomcat. Jasper parses JSP files to compile them into Java code as servlets, then handled by Catalina. At runtime, Jasper detects changes to JSP files and recompiles them.
As of version 5, Apache Tomcat utilizes Jasper 2, an implementation of the JSP 2.0 of the Sun Microsystems. From Jasper to Jasper 2, important features have been added, including the JSP Tag library pooling, background JSP compilation, recompile JSP when included page changes, and the JDT Java compiler.
Following below are the new components added with the release of the Apache Tomcat 7.
This Apache Tomcat component has been added in order to manage bigger applications. It is utilized for load balancing that can be attained through many strategies. Clustering support currently requires the JDK version 1.5 or higher.
This high-availability feature has been added in order to facilitate the system upgrades scheduling, for instance, new releases and change requests, without affecting the live environment.
This is achieved by dispatching live traffic requests to a temporary server on a distinctive port while the main server is upgraded on the main port. It is very useful when handling user requests on web applications in high traffic.
6. Web Application
It also has added user-, as well as system-based web applications improvements to add support for deployment across various environments. It also works to manage sessions, as well as applications across the network.
The Apache Tomcat is building more components. A number of these components may be used with Apache Tomcat. These components may be built by users should they require them or they can be downloaded from one of the mirrors.
Various Use Cases
It is interesting to note that the use cases for the Apache Tomcat are quite broad, as it is among the most widely used Java servers. For one, Java-based shopping cart application KonaKart runs on Apache Tomcat and utilizes it as Java API and SOAP Web Service interface.
Because of the nature of Apache Tomcat being open-source, many developers have adapted and reshaped this. Distributions include Springsource’s Enterprise Ready Server or ERS.
Another use case of the Apache Tomcat is within cloud environments, such as the Axon datacentres which are powered in part by Tomcat.
The team behind the Apache Tomcat notes that the Apache Tomcat project is intended to be a collaboration of the best developers worldwide, as the software powers numerous large-scale, mission-critical web applications across a diverse range of organizations and industries.
Moreover, when utilizing the Apache Tomcat in a large-scale production arena, many administrators implement some form of additional monitoring, development, or configuration management strategies.
The documentation available as of the release date is included in the docs web app which ships with tomcat. You may access the web app by launching tomcat and visiting http://localhost:8080/docs/ in your browser. The most updated documentation for each version can be found at:
- Tomcat 10.1
- Tomcat 10.0
- Tomcat 9
- Tomcat 8
- Tomcat 7
Please refer to RUNNING.txt for more information.
See LICENSE for more details.
Support And Mailing List Details
Free community support is accessible via the tomcat-users email list and a dedicated IRC channel (#tomcat on Freenode).
If you are looking for freely available support for running the Apache Tomcat, you may visit the resources page from its official website.
Should you want information on new code releases, bug fixes, security fixes, or general news and information about the Apache Tomcat, you can subscribe to the tomcat-announce email list.
If you have a concrete bug report for Apache Tomcat, you may see the instructions for reporting a bug via this page.