Content
Table of Contents
General
Please read the general Migration Guide page first, for common considerations that apply to migration or upgrade between versions of Apache Tomcat®.
Migrating from 11.0.x to 12.0.x
This section lists all the known changes between 11.0.x and 12.0.x which may cause backwards compatibility problems when upgrading.
Java 21 required
Apache Tomcat 12.0.x requires Java 21 or later. Apache Tomcat 11.0.x required Java 17.
Specification APIs
Apache Tomcat 12.0 supports the Jakarta Servlet 6.2, Jakarta Pages 4.1, Jakarta Expression Language 6.1, JakartaWebSocket 2.3, Jakarta Authentication 3.2 and Jakarta Annotations 3.1 specifications.
Servlet 6.2
None.
Pages 4.1
None.
Expression Language 6.1
None.
WebSocket 2.3
ClientEndpointConfig.Configurator.afterResponse() is now
called after every WebSocket handshake regardless of whether the
handshake is successful or not.
When attempting to write a message via a WebSocket session that has been
closed, an IOException rather than an
IllegalStateExcpetion is thrown for consistency with
Writer and OutputStream.
Authentication 3.2
None.
Annotations 3.1
None.
Packaging
The Apache Tomcat Embedded distribution ZIP file now contains files which are in a directory matching the version number. This matches the file layout of the embedded tarball package as well as the other ZIP files for each release.
Internal APIs
Whilst the Tomcat 12.0 internal API is broadly compatible with Tomcat 11.0 there have been many changes at the detail level and they are not binary compatible. Developers of custom components that interact with Tomcat's internals should review the JavaDoc for the relevant API.
Of particular note are:
- All code marked as deprecated in 11.0.x has been removed.
- The
useAcceptRangesinitialisation parameter for the default servlet has been removed. It is now effectively hard coded totrue - The default for the
encodedSolidusHandlingattribute of a Context has changed fromdecodetoreject. - When searching the web application class loader for a resource or
resources by name, align the behaviour with the JRE class loaders and
always return
nullif the provided name starts with/. - The default value for the
allowPostAsGetinitialisation parameter of the Default servlet has been updated fromtruetofalse. This means a direct request (i.e. not a forward or an include) for a static resource using the POST method will be rejected by default. - Calls to
HttpServletRequest.getContextPath()now return the canonical context path for the web application rather than the component of the request URI presented by the user agent that maps to the context path. - The default value of the
archiveIndexStrategyattribute of theResourceselement has been changed fromsimpletobloomto improve web application class loading performance. - The default for the
digestInRfc3112Orderattribute ofMessageDigestCredentialHandlerhas been changed fromfalsetotrue. - The default value of the
cookiesWithoutEqualsattribute of theRfc6265CookieProcessorhas been changed fromnametoignore. - The default password value (was
changeit) for thecertificateKeystorePasswordattribute of a certificate has been removed. - Support for HTTP/0.9 has been removed.
Upgrading 12.0.x
When upgrading instances of Apache Tomcat from one version of Tomcat 12.0 to another, particularly when using separate locations for $CATALINA_HOME and $CATALINA_BASE, it is necessary to ensure that any changes in the configuration files such as new attributes and changes to defaults are applied as part of the upgrade. To assist with the identification of these changes, the form below may be used to view the differences between the configuration files in different versions of Tomcat 12.0.
Tomcat 12.0.x noteable changes
The Tomcat developers aim for each stable patch release to be fully backwards compatible with the previous release. Occasionally, it is necessary to break backwards compatibility in order to fix a bug. In most cases, these changes will go unnoticed. This section lists changes that are not fully backwards compatible and might cause breakage when upgrading.
- JAASRealm has been removed.
Tomcat 12.0.x configuration file differences
Select a configuration file, old version and new version from the boxes below and then click "View differences" to see the differences. The differences will be shown in a new tab/window.
Note: If there are no differences you will see an error page.
You can also use a Git command similar to the following from within a working copy:
git diff 12.0.0-M1 12.0.0-M2 -- conf/
