Apache Tomcat
| File:Apache Tomcat logo.svg Apache Tomcat logo | |
| Company type | Open source software |
|---|---|
| Industry | Software development |
| Founded | November 1998 |
| Founder | James Duncan Davidson |
| Headquarters | United States |
Area served | Worldwide |
| Products | Jakarta Servlet, Jakarta Expression Language, WebSocket server environment |
| Owner | Apache Software Foundation |
| Website | tomcat |
Apache Tomcat—often simply called "Tomcat"—is a no-cost, open-source implementation of Jakarta Servlet, Jakarta Expression Language, and WebSocket standards. It offers a "pure Java" HTTP server environment capable of executing Java code, operating as a Java web application server but not qualifying as a complete JEE application server.
Maintained by an open community under the auspices of the Apache Software Foundation, Tomcat is distributed under the Apache License 2.0.
Components
The release of Tomcat 4.x introduced several key components: Catalina (the servlet container), Coyote (the HTTP connector), and Jasper (the JSP engine).
Catalina
Serving as Tomcat’s servlet container, Catalina implements the specifications for servlets and JavaServer Pages (JSP). Its Realm element handles user authentication by representing collections of usernames, passwords, and roles. Multiple Realm implementations facilitate integration with existing authentication infrastructures, enabling Container Managed Security in accordance with the Servlet Specification.
Coyote
Coyote functions as Tomcat’s Connector, supporting both HTTP/1.1 and HTTP/2 protocols. It allows Catalina to operate as a web server that delivers local files as HTTP responses. Listening on a TCP port, Coyote forwards incoming requests to the Tomcat Engine for handling and generating replies. Additionally, the Coyote JK Connector can relay requests to external web servers such as Apache using the JK Protocol, often enhancing overall performance.
Jasper
Jasper acts as the JSP Engine within Tomcat, responsible for parsing JavaServer Pages (JSP) files and compiling them into Java servlets managed by Catalina. During runtime, Jasper monitors JSP files for modifications and recompiles them as needed.
Starting with version 5, Tomcat incorporates Jasper 2, which implements Sun Microsystems' JSP 2.0 specification. Notable improvements introduced from Jasper to Jasper 2 include:
- Pooling of JSP tag libraries—tag handler class instances are reused across JSP servlets.
- Background compilation—previous servlet versions remain active during recompilation to prevent service interruptions.
- Recompilation triggered by changes in included pages—JSPs recompile not only when their own source files change but also when included resources are updated.
- Support for the Eclipse JDT compiler—Jasper 2 can utilize this compiler instead of relying on Ant and javac.
Tomcat 7 brought three additional components:
Cluster
This module is designed to support large-scale applications by providing load balancing through various mechanisms and requires JDK version 1.5 or above.
High availability
This capability facilitates uninterrupted system upgrades by redirecting live traffic to a temporary server while the primary server undergoes maintenance, a critical feature for high-traffic web environments.
Features
Tomcat version 9.x implements Servlet 4.0 and JSP 2.3 specifications.
Tomcat 10.1.x supports Servlet 6.0 alongside JSP 3.1 specifications.
Tomcat 11.x is compatible with Servlet 6.1 and JSP 4.0 specifications.
History
Originally launched in November 1998, Tomcat started as a servlet reference implementation created by James Duncan Davidson at Sun Microsystems. He championed open-sourcing the project and was instrumental in its donation to the Apache Software Foundation. The development of Tomcat also led to the creation of the Apache Ant build tool as a byproduct.
The name Tomcat was selected by Davidson inspired by the animal’s independence, fitting within a common open-source tradition of animal-themed names. Although another O'Reilly publication had previously used "Tomcat," O'Reilly eventually released a book titled Tomcat in 2003 featuring a snow leopard on its cover, fulfilling Davidson's vision for an animal-associated title.
Communities
The development of Apache software is driven by a collaborative community approach, utilizing distinct mailing lists for users and developers. The developer mailing list is dedicated to the creation and testing of new releases, whereas the user mailing list serves as a platform for troubleshooting and providing assistance.
Prominent communities related to Apache Tomcat include Tomcatexpert.com, a resource sponsored by SpringSource that caters to developers and system administrators overseeing extensive production deployments. Additionally, MuleSoft offers the Apache Tomcat Resource Center, which provides comprehensive documentation on setup, configuration, performance monitoring, and security best practices.
Apache TomEE
Apache TomEE (nicknamed "Tommy") represents the Enterprise Edition of Apache Tomcat, incorporating several Java enterprise technologies such as Apache OpenEJB, OpenWebBeans, OpenJPA, and MyFaces. In October 2011, it achieved Oracle certification as a Java EE 6 Web Profile–compliant implementation, thereby bolstering its suitability for enterprise-level applications.
See also
- WildFly, previously known as JBoss Application Server
- Jetty (web server)
- GlassFish, the official Jakarta EE reference implementation supporting EJB, JPA, JSF, JMS, RMI, JSP, and servlets
- Comparison of web server software
Discontinued or legacy software related to this ecosystem:
- MuleSoft, creator of the Tcat enterprise Tomcat server
- Apache Geronimo, an application server utilizing Tomcat as its web container
- Resin (software), developed by Caucho Technology
- JOnAS, an application server compatible with the Tomcat web container
- Apache OpenEJB, which extends Tomcat into a comprehensive Java EE server
Bibliography
- Jason Brittain & Ian F. Darwin, Tomcat: The Definitive Guide, 1st & 2nd editions, O'Reilly Media
- Vivek Chopra, Sing Li & Jeff Genender, Professional Apache Tomcat 6, Wrox Press
- Matthew Moodie & Kunal Mittal (Ed.), Pro Apache Tomcat 6, Apress