Apache Tomcat 10: Key Considerations for Deployment
Apache Tomcat 10 is the latest major version of the popular Apache Tomcat web server and Java servlet container. But how is Apache Tomcat 10 different from previous versions, and what can developers look forward to when upgrading to this new version?
In this blog, we give answers to those questions — and dive in on what to expect in upcoming Tomcat 10.x releases and the distant Tomcat 11 release.
- About the Apache Tomcat 10 Release
- Features and Changes in Tomcat 10
- Apache Tomcat 10 vs. Tomcat 9
- Tomcat 10 Migration and Upgrade Considerations
- What to Expect from Tomcat 10.x Releases
- Looking Forward to Tomcat 11
About the Apache Tomcat 10 Release
Tomcat 10 is the latest major version of Apache Tomcat. It builds upon the popular Tomcat 9 series of releases. Major changes in Tomcat 10 are centered around name changes from the JavaEE to JakartaEE namespace.
Apache Tomcat 10 was initially released on February 2nd, 2021.
Notable Changes at a Glance
Tomcat requires Java 8+, and deploys Servlet 5.0, JSP 3.0, EL 4.0, JWS 2.0, and JASPIC 2.0 specifications.
Now Available: The Enterprise Guide to Apache Tomcat
Whether you're working with or considering Apache Tomcat, knowing the best practices for performance, security, and resilience is key. Get an overview in this free guide.
Features and Changes in Apache Tomcat 10
While the main differences between Tomcat 9.x.x and 10.x.x are not entirely significant, there are some notable differences between the two. The servlet jumps up to 5.0 from 4, JSP jumps up from 2.3 to 3.0, EL goes from 3.0 to 4.0, JWS from 1.1 to 2.0, and JASPIC 1.1 to 2.0.
There are other notable changes related to web application reloading, static fields, symlinks, and bundled APIs. Documentation for these changes can be found in the Tomcat 10 release notes.
Web Application Reloading and Static Fields in Shared Libraries
When it comes to loading classes versus libraries, Apache Tomcat 10 suggests one avoids putting classes that are reffered to by a static field inside the web application classloader be instead put into the shared classloader instead. The reasoning for this is that some shared libraries keep references to objects instantiated by the web app. We want to avoid class loading problems with these settings, so reinitializing the shared libraries state is needed here.
Symlinking Static Resources
Unix symlinks won’t work when used by a web app to link resources found outside the default web application directory. If you wish to disable the check on this, you can use the “allowLinking” flag.
Bundled APIs in Tomcat 10
The bundled APIs for Apache Tomcat 10 include:
- annotations-api.jar (Annotations package)
- catalina.jar (Tomcat Catalina implementation)
- catalina-ant.jar (Tomcat Catalina Ant tasks)
- catalina-ha.jar (High availability package)
- catalina-ssi.jar (Server-side Includes module)
- catalina-storeconfig.jar (Generation of XML configuration from current state)
- catalina-tribes.jar (Group communication)
- ecj-4.20.jar (Eclipse JDT Java compiler)
- el-api.jar (EL 4.0 API)
- jasper.jar (Jasper 2 Compiler and Runtime)
- jasper-el.jar (Jasper 2 EL implementation)
- jsp-api.jar (JSP 3.0 API)
- servlet-api.jar (Servlet 5.0 API)
- tomcat-api.jar (Interfaces shared by Catalina and Jasper)
- tomcat-coyote.jar (Tomcat connectors and utility classes)
- tomcat-dbcp.jar (package renamed database connection pool based on Commons DBCP 2)
- tomcat-jdbc.jar (Tomcat's database connection pooling solution)
- tomcat-jni.jar (Interface to the native component of the APR/native connector)
- tomcat-util.jar (Various utilities)
- tomcat-websocket.jar (WebSocket 2.0 implementation)
- websocket-api.jar (WebSocket 2.0 API)
Apache Tomcat 10 vs. Tomcat 9
When comparing Tomcat 9 vs. Tomcat 10, functionally, we’re not looking at a lot of tangible feature changes. Both require Java+, but there is one thing worth mentioning difference wise: Between 9 and 10 there is a significant breaking change involving the java packaged in use by the specification API’s.
Having changed package naming conventions from javax to Jakarta, web applications will need to be recompiled against the new API’s. With the way Tomcat is designed, 10 is supposed to be fully compatible with 9 as far as upgrading goes. The changes to the package names in the Jakarta Servlet and other related technologies from javax to Jakarta are the primary things to be adjusted. Otherwise the main changes we’re seeing are security patches and maintenance changes.
Apache Tomcat 10 Migration and Upgrade Considerations
In the open source community, it’s important to keep up to date on major and minor release updates because that’s how the software is patched. The current version is not provided a bug fix, instead, you must upgrade to the newer, patched version of the product you’re using. This includes going from 9.1.x to 9.2.x but also from 9.x to 10.x..
While the solution is simple in theory, it’s not always the easiest to execute, especially when you’ve fallen drastically behind in your upgrades and you now have a large gap of updates to cover. Apache have done everything they can with Tomcat 10 to make upgrading from any version of 9 a breeze. They have a migration guide that you can use to assist you in the migration. But, if you're looking for additional help, OpenLogic offers professional services and Apache Tomcat Support as well.
Apache Tomcat 10 Migration Utility
In addition to the documentation that Apache provides on upgrading and migrating, there’s an actual tool developed by Apache that can help automate the process.
What to Expect from Tomcat 10.x Releases
The next milestone for the Tomcat project is the 10.1 version, which is currently in alpha. Tomcat 10.1.x will require Java versions 11 and higher, and will use Servlet 6.0, JSP 3.1, EL 5.0, and JWS 2.1. The authentication specification version is yet to be determined.
Looking Forward to Tomcat 11
At this time, based off of a developer response to someone asking about the EOL for Tomcat 9, it’s looking like Tomcat 11 won’t be around until sometime in 2023 or 2024. At the same time, it’s likely the EOL announcement for Tomcat 8.5 will occur sometime in the near future, pushing things forward for the EOL on Tomcat 9 and 10.0 branches.
Because Tomcat 11 is not even in Alpha yet, we can’t predict much as far as new features or changes, but we would expect a longer life out of 10.1 than 10.0.x, giving Tomcat 10 users some extended time to stay on the 10 platform.
If Tomcat takes cues from the aggressive requirements in upcoming Spring Framework versions, we can likely expect the required Java version for Tomcat major versions beyond 10.1 to keep pace.
Get Support for Your Tomcat Deployment
Need technical support for your Tomcat deployments? Need help planning a migration? Short on Tomcat expertise in your organization? OpenLogic is here to help. Talk to an expert today to learn more about how we can support your Tomcat deployments.
- Resource Collection - Tomcat Overview
- Blog - Preparing for Your Next Tomcat Upgrade
- Blog - Beginner's Guide to Tomcat Memory Configuration
- Blog - Tomcat Configuration Tips and Tricks
- Blog - 5 Apache Tomcat Performance Best Practices
- Blog - What Is Apache Tomcat?
- Blog - GhostCat Vulnerability in Tomcat
- Blog - Apache Tomcat 7: EOL Dates and Considerations
- Blog - Apache Tomcat 8: Overview, Clustering, and More
- Blog: Tomcat 9 Overview: Key Features and Considerations
- Blog - Apache Tomcat Clustering: The Ultimate Guide
- Blog - Apache Tomcat Security Best Practices
- Blog - Tomcat vs. TomEE: Comparing Specifications and Use Cases