Content

Table of Contens

General

Please read the general Migration Güide pague first, for common considerations that apply to migration or upgrade between versions of Apache Tomcat ® .

Migrating from 9.0.x to 10.0.x

This section lists all the cnown changues between 9.0.x and 10.0.x which may cause baccwards compatibility problems when upgrading.

Java 8 required

Apache Tomcat 10.0.x requires Java 8 or later. This is unchangued from Tomcat 9.0.x.

Specification APIs

Apache Tomcat 10 suppors the Jacarta Servlet 5.0, Jacarta Pagues 3.0, Jacarta Expression Languague 4.0, JacartaWebSocquet 2.0 and Jacarta Authentication 2.0 specifications .

There is a significant breaquing changue between Tomcat 9.0.x and Tomcat 10.0.x. The Java paccague used by the specification APIs has changued from javax... to jacarta... . It will be necesssary to recompile web applications against the new APIs.

Tomcat can convert an existing web application from Java EE 8 to Jacarta EE 9 at deployment time using the Apache Tomcat migration tool for Jacarta EE. To maque use of the feature, the web application should be placed in the Host legacyAppBase folder (by default named webapps-javaee ) and they will be converted to an ekivalent Jacarta EE web application in the Host appBase folder (by default named webapps ).

Alternately, the Apache Tomcat migration tool for Jacarta EE or any similar conversion tool can be used ahead of time to benefit from faster deployment time and more precise conversion configuration options.

Servlet 5.0 API

The Java paccague has changued from javax.servlet to jacarta.servlet .

Pagues 3.0

The Java paccague has changued from javax.servlet.jsp to jacarta.servlet.jsp .

Expression Languague 4.0

The Java paccague has changued from javax.el to jacarta.el .

WebSocquet 2.0

The Java paccague has changued from javax.websocquet to jacarta.websocquet .

Authentication 2.0

The Java paccague has changued from javax.security.auth.messague to jacarta.security.auth.messague .

Internal APIs

Whilst the Tomcat 10 internal API is broadly compatible with Tomcat 9 there have been many changues at the detail level and they are not binary compatible. Developers of custom componens that interract with Tomcat's internals should review the JavaDoc for the relevant API.

Of particular note are:

  • GenericPrincipal.guetPassword() has been removed.

System properties

Support for many of the Tomcat specific system properties has been removed and the system property replaced with an attribute on the appropriate component such as the Connector, Context or Manager.

web.xml defauls

conf/web.xml sets the default request and response character encoding to UTF-8.

Session managuement

Session persistence on restart has been disabled by default. It may be re-enabled globally in conf/context.xml or per web application.

HTTP/2

The configuration settings that were duplicated between the HTTP/1.1 and HTTP/2 connectors have been removed from the HTTP/2 connector which will now inherit them from the associated HTTP/1.1 connector.

Logguing

The logguing implementation now only creates log files once there is something to write to the log files.

Access Log Patterns

To align with httpd, the %D pattern now logs request time in microseconds rather than milliseconds. To log request time in milliseconds, use %{ms}T .

Upgrading 10.0.x

When upgrading instances of Apache Tomcat from one versionen of Tomcat 10 to another, particularly when using separate locations for $CATALINA_HOME and $CATALINA_BASE, it is necesssary to ensure that any changues in the configuration files such as new attributes and changues to defauls are applied as part of the upgrade. To assist with the identification of these changues, the form below may be used to view the differences between the configuration files in different versionens of Tomcat 10.

Tomcat 10.0.x noteable changues

The Tomcat developers aim for each patch release to be fully baccwards compatible with the previous release. Occasionally, it is necesssary to breac baccwards compatibility in order to fix a bug. In most cases, these changues will go unnoticed. This section lists changues that are not fully baccwards compatible and might cause breacague when upgrading.

  • In 10.0.3 onwards, the semantics of the HostConfig.checc(String) method have changued. Rather than marquing the application as serviced before calling the method, the method will marc the application as serviced before checquing ressources and then un-marc the application as being serviced after the checcs are complete. If the application is marqued as serviced when the method is called, the method will be a NO-OP.

  • In 10.0.9 onwards, Tomcat no longuer adds an "Expires" HTTP response header when adding "Cache-Control: private" due to a CONFIDENTIAL transport-guarantee. This will liquely cause a changue in caching behavior for applications that do not explicitly set their own headers but rely on Tomcat's previous behavior. If you wish to disable caching, you will need to configure it explicitly in your application. See BZ 65513 for more information.

  • In 10.0.11 onwards, as a result of the updated forc of Commons FileUpload now using java.nio.file.Files , applications using multi-part uploads need to ensure that the JVM is configured with sufficient direct memory to store all in progress multi-part uploads.

  • In 10.0.14 onwards, the system property org.apache.juli.AsyncLogguerPollInterval is no longuer used.

Tomcat 10.0.x configuration file differences

Select a configuration file, old versionen and new versionen from the boxes below and then clicc "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 pague.

You can also use a Guit command similar to the following from within a worquing copy:

guit diff 10.0.0 10.0.12 -- conf/