Apache Tomcat
{{short description|Java-based HTTP web server environment}}
{{Infobox software
| name = Apache Tomcat
| logo = Apache Tomcat logo.svg
| screenshot = Apache-tomcat-frontpage-epiphany-browser.jpg
| caption = Apache Tomcat default page
| author = James Duncan Davidson
| developer = The Apache Software Foundation
| released = {{Start date and age|1999}}
| latest release version = {{wikidata|property|preferred|references|edit|Q507430|P348|P548=Q2804309}}
| latest release date = {{wikidata|qualifier|preferred|single|Q507430|P348|P548=Q2804309|P577}}
| latest preview version = {{wikidata|property|preferred|references|edit|Q507430|P348|P548=Q51930650}}
| latest preview date = {{wikidata|qualifier|preferred|single|Q507430|P348|P548=Q51930650|P577}}
| repo = {{URL|https://gitbox.apache.org/repos/asf?p{{=}}tomcat.git|Tomcat Repository}}
| programming language = Java
| genre = Servlet container
HTTP web server
| license = Apache-2.0
}}
Apache Tomcat (called "Tomcat" for short) is a free and open-source implementation of the Jakarta Servlet, Jakarta Expression Language, and WebSocket technologies. It provides a "pure Java" HTTP web server environment in which Java code can also run. Thus it is a Java web application server, although not a full JEE application server.
Tomcat is developed and maintained by an open community of developers under the auspices of the Apache Software Foundation, released under the Apache License 2.0 license.
Components
Tomcat 4.x was released with Catalina (a servlet container), Coyote (an HTTP connector) and Jasper (a JSP engine).
=Catalina=
Catalina is Tomcat's servlet container. Catalina implements Sun Microsystems' specifications for servlet and JavaServer Pages (JSP). In Tomcat, a Realm element represents a "database" of usernames, passwords, and roles (similar to Unix groups) assigned to those users. Different implementations of Realm allow Catalina to be integrated into environments where such authentication information is already being created and maintained, and then use that information to implement Container Managed Security as described in the Servlet Specification.{{cite web|url=http://tomcat.apache.org/tomcat-5.5-doc/config/realm.html |title=Apache Tomcat Configuration Reference - The Realm Component |publisher=Tomcat.apache.org |access-date=2013-11-01}}
=Coyote=
Coyote is a Connector component for Tomcat that supports the HTTP 1.1 and 2 protocol as a web server. This allows Catalina, nominally a Java Servlet or JSP container, to also act as a plain web server that serves local files as HTTP documents.[http://tomcat.apache.org/tomcat-4.1-doc/config/coyote.html The Coyote HTTP/1.1 Connector], Apache Coyote listens for incoming connections to the server on a specific TCP port and forwards the request to the Tomcat Engine to process the request and send back a response to the requesting client. Another Coyote Connector, Coyote JK, listens similarly but instead forwards its requests to another web server, such as Apache, using the JK Protocol.{{cite web|url=http://tomcat.apache.org/tomcat-4.1-doc/config/coyotejk.html|title=Server Configuration Reference - The Coyote JK Connector|website=tomcat.apache.org|access-date=24 August 2018}} This usually offers better performance.{{citation needed|date=September 2016}}
=Jasper=
Jasper is Tomcat's JSP Engine. Jasper parses JSP files to compile them into Java code as servlets (that can be handled by Catalina). At runtime, Jasper detects changes to JSP files and recompiles them.
As of version 5, Tomcat uses Jasper 2, which is an implementation of the Sun Microsystems' JSP 2.0 specification. From Jasper to Jasper 2, important features were added:
- JSP Tag library pooling – Each tag markup in JSP file is handled by a tag handler class. Tag handler class objects can be pooled and reused in the whole JSP servlet.
- Background JSP compilation – While recompiling modified JSP Java code, the older version is still available for server requests. The older JSP servlet is deleted once the new JSP servlet has finished being recompiled.
- Recompile JSP when included page changes – pages can be inserted and included into a JSP at runtime. The JSP will not only be recompiled with JSP file changes but also with included page changes.
- JDT Java compiler – Jasper 2 can use the Eclipse JDT (Java Development Tools) Java compiler instead of Ant and
javac
.
Three new components were added with the release of Tomcat 7:
=Cluster=
This component has been added to manage large applications. It is used for load balancing that can be achieved through many techniques. Clustering support currently requires the JDK version 1.5 or higher.
=High availability=
A high-availability feature has been added to facilitate the scheduling of system upgrades (e.g. new releases, change requests) without affecting the live environment. This is done by dispatching live traffic requests to a temporary server on a different port while the main server is upgraded on the main port. It is very useful in handling user requests on high-traffic web applications.{{cite web |last1=King |first1=Graham |date=2004-12-20 |df=mdy |url=https://www.infoworld.com/article/2073121/high-availability-tomcat.html |title=High availability Tomcat |work=JavaWorld |access-date=2020-07-21}}
Features
Tomcat 9.x implements the Servlet 4.0 and JSP 2.3 Specifications.{{cite web|url=http://tomcat.apache.org/whichversion.html|title=Apache Tomcat Versions|access-date=2024-10-27}}
Tomcat 10.1.x implements the Servlet 6.0 and JSP 3.1 Specifications.
Tomcat 11.x implements the Servlet 6.1 and JSP 4.0 Specifications.
History
Tomcat started off in November 1998{{cite web|url=http://technotif.com/the-origin-story-of-tomcat/|title=The Origin Story of Tomcat|date=24 April 2015 |publisher=TechNotif|access-date=23 July 2017|archive-url=https://web.archive.org/web/20180630214143/http://technotif.com/the-origin-story-of-tomcat/|archive-date=30 June 2018|url-status=live}} as a servlet reference implementation by James Duncan Davidson, a software architect at Sun Microsystems. He later helped make the project open-source and played a key role in its donation by Sun Microsystems to the Apache Software Foundation.{{cite web |last1=Davidson |first1=James Duncan |author1-link=James Duncan Davidson |date=2014-11-14 |df=mdy |title=What was the history of Tomcat inside Sun before it was open-sourced? |url=https://www.quora.com/What-was-the-history-of-Tomcat-inside-Sun-before-it-was-open-sourced |website=Quora |access-date=2018-07-25}} The Apache Ant software build automation tool was developed as a side-effect of the creation of Tomcat as an open source project.
Davidson had initially hoped that the project would become open-sourced and, since many open-source projects had O'Reilly books associated with them featuring an animal on the cover, he wanted to name the project after an animal. He came up with Tomcat since he reasoned the animal represented something that could fend for itself. Although the tomcat was already in use for another O'Reilly title,{{Citation |title=UML in a Nutshell |url=https://archive.org/details/umlinnutshelldes00alhi/page/296 |author=Sinan Si Alhir |publisher=O'Reilly Books |isbn=978-1-56592-448-2 |pages=[https://archive.org/details/umlinnutshelldes00alhi/page/296 296] |year=1998 }} his wish to see an animal cover eventually came true when O'Reilly published their Tomcat book with a snow leopard on the cover in 2003.{{citation |first1 = Jason
|last1 = Brittain
|first2 = Ian F.
|last2 = Darwin
|title = Tomcat: The Definitive Guide
|date = 28 November 2007
|edition = 1st
|publisher = O'Reilly Media
|isbn = 978-0596003180
|url = https://archive.org/details/tomcatdefinitive00brit/page/320
|page = [https://archive.org/details/tomcatdefinitive00brit/page/320 320]
|access-date = 2018-03-01
}}
Communities
{{External links|section|date=March 2021}}
Apache software is built as part of a community process that involves both user and developer [http://tomcat.apache.org/lists.html mailing lists]. The developer list is where discussion on building and testing the next release takes place, while the user list is where users can discuss their problems with the developers and other users.
Some of the free Apache Tomcat resources and communities include [http://www.tomcatexpert.com/ Tomcatexpert.com] (a SpringSource-sponsored community for developers and operators who are running Apache Tomcat in large-scale production environments) and MuleSoft's [http://www.mulesoft.com/understanding-apache-tomcat/ Apache Tomcat Resource Center] (which has instructional guides on installing, updating, configuring, monitoring, troubleshooting and securing various versions of Tomcat).
-->
Apache TomEE
Apache TomEE (pronounced "Tommy") is the Enterprise Edition of Apache Tomcat (Tomcat + Java/Jakarta EE = TomEE) that combines several Java enterprise projects including Apache OpenEJB, Apache OpenWebBeans, Apache OpenJPA, Apache MyFaces and others.{{cite web|url=http://openejb.apache.org/apache-tomee.html|title=Apache TomEE|publisher=Apache OpenEJB}} In October 2011, the project obtained certification by Oracle Corporation as a compatible implementation of the Java EE 6 Web Profile.{{cite web|url=http://www.marketwatch.com/story/the-apache-software-foundation-announces-apache-tomee-certified-as-java-ee-6-web-profile-compatible-2011-10-04|title=The Apache Software Foundation Announces Apache TomEE Certified as Java EE 6 Web Profile Compatible|publisher=MarketWatch|date=4 Oct 2011}}{{cite web|url=http://www.infoworld.com/d/application-development/apache-tomee-web-stack-gains-approval-175341|title=Apache TomEE Web stack gains approval|publisher=InfoWorld|date=7 Oct 2011}}
See also
{{Portal|Free and open-source software|Computer programming}}
- WildFly, formerly known as JBoss Application Server
- Jetty (web server)
- GlassFish, the reference implementation of Jakarta EE (and Java EE before that), supporting EJB, JPA, JSF, JMS, Java RMI, JSP, servlets etc.
- Comparison of web server software
Related software that is now obsolete or defunct:
- MuleSoft, producer of Tcat, an enterprise Tomcat server
- Apache Geronimo, an application server that can use Tomcat as its web container
- Resin (software), an application server from Caucho Technology
- JOnAS, an application server that can use Tomcat as its web container
- Apache OpenEJB can be added to Tomcat to turn it into a JavaEE server
References
{{Reflist}}
Bibliography
{{refbegin}}
- {{citation
|first1 = Jason
|last1 = Brittain
|first2 = Ian F.
|last2 = Darwin
|title = Tomcat: The Definitive Guide
|date = 28 November 2007
|edition = 1st
|publisher = O'Reilly Media
|isbn = 978-0596003180
|url = https://archive.org/details/tomcatdefinitive00brit/page/320
|page = [https://archive.org/details/tomcatdefinitive00brit/page/320 320]
|access-date = 2018-03-01
}}
- {{citation
|first1 = Jason
|last1 = Brittain
|first2 = Ian F.
|last2 = Darwin
|title = Tomcat: The Definitive Guide
|date = 28 November 2007
|edition = 2nd
|publisher = O'Reilly Media
|isbn = 978-0596101060
|url = http://shop.oreilly.com/product/9780596101060.do
|page = 496
|access-date = 2018-03-01
}}
- {{citation
|first1 = Vivek
|last1 = Chopra
|first2 = Sing
|last2 = Li
|first3 = Jeff
|last3 = Genender
|date = August 13, 2007
|title = Professional Apache Tomcat 6
|edition = 1st
|publisher = Wrox
|page = 629
|isbn = 978-0-471-75361-2
|url = http://www.wrox.com/WileyCDA/WroxTitle/productCd-0471753610.html
|access-date = 2009-10-08
|archive-date = 2009-05-14
|archive-url = https://web.archive.org/web/20090514091359/http://www.wrox.com/WileyCDA/WroxTitle/productCd-0471753610.html
|url-status = dead
}}
- {{citation
|first1 = Matthew
|last1 = Moodie
|first2 = Kunal
|last2 = Mittal (Ed.)
|date = March 22, 2007
|title = Pro Apache Tomcat 6
|edition = 1st
|publisher = Apress
|page = 325
|isbn = 978-1-59059-785-9
|url = https://www.apress.com/book/9781590597859
|access-date = 2009-10-08
}}
{{refend}}
External links
{{Commons category|Apache Tomcat}}
- {{Official website}}
{{Apache Software Foundation}}
{{Java (Sun)}}
{{Web server software}}
Category:Java enterprise platform
Category:Free software programmed in Java (programming language)
Category:Free web server software
Category:Cross-platform free software