- Migrating from 8.0.x to 8.5.x
- Upgrading 8.5.x
Table of Contents
Please read general Migration Guide page first, for common considerations that apply to migration or upgrade between versions of Apache Tomcat.
Migrating from 8.0.x to 8.5.x
This section lists all the known changes between 8.0.x and 8.5.x which may cause backwards compatibility problems when upgrading.
BIO connector removed
The Java blocking IO implementation (BIO) for both HTTP and AJP has been removed. Users are recommended to switch to the Java non-blocking IO implementation (NIO). As of Tomcat 8.5.17, if a BIO Connector is explicitly configured, rather than failing to start the Connector, Tomcat will automatically switch the Connector to use the NIO implementation and log a warning.
HTTP connector changes
Comet support removed
Comet support has been removed without a direct replacement. Applications using Comet are recommended to migrate to WebSockets.
HTTP/2 support added
HTTP/2 is supported for h2 (over TLS, negotiated via ALPN) and h2c (clear text, negotiated via HTTP/1.1 upgrade). HTTP/2 needs to be explicitly enabled for a connector. To enable it, insert
<UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
TLS virtual hosting and multiple certificate support added
Tomcat 8.5 supports multiple TLS virtual hosts for a single connector with each virtual host able to support multiple certificates. Virtual host definitions are nested inside the Connector element with the default specified using the defaultSSLHostConfigName attribute on the Connector if more than one virtual host is specified. Certificate definitions are nested inside the virtual host.
The following example shows how to use this to configure a single APR/native connector for multiple TLS virtual hosts with each host having both an RSA and EC certificate.
<Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol" maxThreads="150" SSLEnabled="true" defaultSSLHostConfigName="openoffice.apache.org" > <SSLHostConfig hostName="openoffice.apache.org" > <Certificate certificateKeyFile="conf/openoffice.apache.org-rsa-key.pem" certificateFile="conf/openoffice.apache.org-rsa-cert.pem" type="RSA" /> <Certificate certificateKeyFile="conf/openoffice.apache.org-ec-key.pem" certificateFile="conf/openoffice.apache.org-ec-cert.pem" type="EC" /> </SSLHostConfig> <SSLHostConfig hostName="www.openoffice.org" > <Certificate certificateKeyFile="conf/www.openoffice.org-rsa-key.pem" certificateFile="conf/www.openoffice.org-rsa-cert.pem" type="RSA" /> <Certificate certificateKeyFile="conf/www.openoffice.org-ec-key.pem" certificateFile="conf/www.openoffice.org-ec-cert.pem" type="EC" /> </SSLHostConfig> </Connector>
Whilst the Tomcat 8.5 internal API is broadly compatible with Tomcat 8.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:
- Significant refactoring has taken place throughout the connectors to reduce duplicate code and to align behaviour across implementations.
- The deprecated
digestattribute has been removed from the
Realm. This must now be configured via a
AuthenticatorBaseimplementation has been changed to call
JSR-77 implementation removed
The JSR-77 implementation is incomplete and has been removed in 8.5.x. Specifically, the following methods that exposed to JMX have been removed.
MessageDispatch15Interceptor had been used to add the Java 5
features to MessageDispatchInterceptor.
MessageDispatch15Interceptor has been removed in Tomcat 8.5.x
by merging the Java 5 features to
The support of InstanceListener has been removed in 8.5.x. Specifically, the following classes have been removed.
The following session manager attributes have been completely removed in 8.5.
The replacements are as follows:
distributableattribute has been deprecated in 8.0 and specified value is ignored. This should be configured via the Context. The value is inherited based on the presence or absence of the
<distributable />element in
maxInactiveIntervalattribute has been deprecated in 8.0. If the value is specified, a warning log is issued. This should be configured via the Context. The value is inherited based on the value of the
Managerhas been replaced by
CookieProcessor is now the
Context and the
LegacyCookieProcessor may be used to obtain the 8.0.x
The Manager and HostManager web applications are configured by default
RemoteAddrValve that limits access to those
applications to connections from localhost.
clearReferencesStatic attribute has been removed in
When upgrading instances of Apache Tomcat from one version of Tomcat 8 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 8.
Tomcat 8.5.x noteable changes
The Tomcat developers aim for each 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.
Tomcat 8.5.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.
You can also use Subversion command similar to the following (all on one line):
svn diff --old=http://svn.apache.org/repos/asf/tomcat/tc8.5.x/tags/TOMCAT_8_5_0/conf/ --new=http://svn.apache.org/repos/asf/tomcat/tc8.5.x/tags/TOMCAT_8_5_2/conf/