Users of Tomcat 10.x onwards should be aware that, as a result of the move from Java EE to Jakarta EE as part of the transfer of Java EE to the Eclipse Foundation, the primary package for all implemented APIs has changed from javax.* to jakarta.*. This will almost certainly require code changes to enable applications to migrate to Tomcat 10.x and later.

Tomcat 10.x onwards has an integrated functionality for automatically migrating J2EE / Java EE WARs to Jakarta EE. You can follow the instructions on Deploying legacy WARs to Tomcat 10.x onwards to make use of it.

Container Features

Feature name

Java API

Ant tasks

Maven 3 plugin

Comment

Container Instantiation

(tick) ContainerFactory.createContainer("tomcat11x"...)

(tick) <cargo containerId="tomcat11x".../>

(tick) <containerId>tomcat11x</containerId>

 

Local Container

(tick)

(tick)

(tick)

 

Container Classpath

(tick)

(tick)

(tick)

 

Container Start

(tick)

(tick)

(tick)

 

Container Stop

(tick)

(tick)

(tick)

 

Container Timeout

(tick)

(tick)

(tick)

 

Embedded Container

(tick) o.c.c.c.tomcat.Tomcat11xEmbeddedLocalContainer

(tick)

(tick)

 

Installed Container

(tick) o.c.c.c.tomcat.Tomcat11xInstalledLocalContainer

(tick)

(tick)

 

   Passing system properties

(tick)

(tick)

(tick)

 

   Installer

(tick)

(tick)

(tick)

 

Remote Container

(tick) o.c.c.c.tomcat.Tomcat11xRemoteContainer

(tick)

(tick)

 

Configuration Features

Feature name

Java API

Ant tasks

Maven 3 plugin

Comment

Standalone Local Configuration for installed container

(tick) o.c.c.c.tomcat.Tomcat11xStandaloneLocalConfiguration

(tick)

(tick)

 

Standalone Local Configuration for embedded container

(tick) o.c.c.c.tomcat.Tomcat11xStandaloneLocalConfiguration

(tick)

(tick)

 

Existing Local Configuration for installed container

(tick) o.c.c.c.tomcat.TomcatExistingLocalConfiguration

(tick)

(tick)

 

Existing Local Configuration for embedded container

(tick) o.c.c.c.tomcat.TomcatExistingLocalConfiguration

(tick)

(tick)

 

Runtime Configuration

(tick) o.c.c.c.tomcat.Tomcat11xRuntimeConfiguration

(tick)

(tick)

 

Static deployment of WAR

(tick)

(tick)

(tick)

 

Static deployment of expanded WAR

(tick)

(tick)

(tick)

 

Static deployment of EJB

(error)

(error)

(error)

 

Static deployment of EAR

(error)

(error)

(error)

 

Static deployment of RAR

(error)

(error)

(error)

 

Static deployment of files

(error)

(error)

(error)

 

Static deployment of OSGi Bundles

(error)

(error)

(error)

 

Deployer Features

Feature name

Java API

Ant tasks

Maven 3 plugin

Comment

Installed Deployer

(tick) o.c.c.c.tomcat.TomcatCopyingInstalledLocalDeployer

(tick)

(tick)

 

Embedded Deployer

(tick) o.c.c.c.tomcat.TomcatEmbeddedLocalDeployer

(tick)

(tick)

 

Remote Deployer

(tick) o.c.c.c.tomcat.Tomcat11xRemoteDeployer

(tick)

(tick)

 

Other Features

Feature name

Java API

Ant tasks

Maven 3 plugin

Comment

Debugging

(tick)

(tick)

(tick)

 

Supported Configuration properties

The tables below list both the general configuration properties as well as the container-specific ones.

Standalone Local Configuration Properties

For installed container o.c.c.c.tomcat.Tomcat11xInstalledLocalContainer

Property name

Java Property

Supported?

Default value

Javadoc

cargo.hostname

GeneralPropertySet.HOSTNAME

(tick)

localhost

(green star)

cargo.java.home

GeneralPropertySet.JAVA_HOME

(tick)

JAVA_HOME version 17 (up to and including Tomcat 11.0.0 M6) or 21 (Tomcat 11.0.0 M7 onwards) or newer

(green star)

cargo.jvmargs

GeneralPropertySet.JVMARGS

(tick)

N/A

(green star)

cargo.logging

GeneralPropertySet.LOGGING

(tick)

medium

(green star)

cargo.port.offset

GeneralPropertySet.PORT_OFFSET

(tick)

0

(green star)

cargo.process.spawn

GeneralPropertySet.SPAWN_PROCESS

(tick)

false

(green star)

cargo.protocol

GeneralPropertySet.PROTOCOL

(tick)

http

(green star)

cargo.rmi.port

GeneralPropertySet.RMI_PORT

(tick)

8205

(green star)

cargo.runtime.args

GeneralPropertySet.RUNTIME_ARGS

(tick)

N/A

(green star)

cargo.servlet.port

ServletPropertySet.PORT

(tick)

8080

(green star)

cargo.servlet.users

ServletPropertySet.USERS

(tick)

admin::manager-script

(green star)

cargo.standalone.ignoreNonExistingProperties

GeneralPropertySet.IGNORE_NON_EXISTING_PROPERTIES

(tick)

N/A

(green star)

cargo.start.jvmargs

GeneralPropertySet.START_JVMARGS

(tick)

N/A

(green star)

cargo.tomcat.ajp.port

TomcatPropertySet.AJP_PORT

(tick)

8009

(green star)

cargo.tomcat.connector.httpUpgradeProtocol

TomcatPropertySet.CONNECTOR_HTTP_UPGRADE_PROTOCOL

(tick)

N/A

(green star)

cargo.tomcat.connector.keystoreFile

TomcatPropertySet.CONNECTOR_KEY_STORE_FILE

(tick)

N/A

(green star)

cargo.tomcat.connector.keystorePass

TomcatPropertySet.CONNECTOR_KEY_STORE_PASSWORD

(tick)

N/A

(green star)

cargo.tomcat.connector.keystoreType

TomcatPropertySet.CONNECTOR_KEY_STORE_TYPE

(tick)

RSA

(green star)

cargo.tomcat.connector.maxHttpHeaderSize

TomcatPropertySet.CONNECTOR_MAX_HTTP_HEADER_SIZE

(tick)

N/A

(green star)

cargo.tomcat.connector.protocolClass

TomcatPropertySet.CONNECTOR_PROTOCOL_CLASS

(tick)

N/A

(green star)

cargo.tomcat.context.allowCasualMultipartParsing

TomcatPropertySet.CONTEXT_ALLOW_MULTIPART

(tick)

true

(green star)

cargo.tomcat.context.mapJarToWebinfClasses

TomcatPropertySet.CONTEXT_MAP_JARS_TO_WEBINF_CLASSES

(tick)

false

(green star)

cargo.tomcat.context.reloadable

TomcatPropertySet.CONTEXT_RELOADABLE

(tick)

false

(green star)

cargo.tomcat.copywars

TomcatPropertySet.COPY_WARS

(tick)

true

(green star)

cargo.tomcat.host.startStopThreads

TomcatPropertySet.HOST_START_STOP_THREADS

(tick)

N/A

(green star)

cargo.tomcat.uriencoding

TomcatPropertySet.URI_ENCODING

(tick)

UTF-8

(green star)

cargo.tomcat.useHttpOnly

TomcatPropertySet.USE_HTTP_ONLY

(tick)

N/A

(green star)

cargo.tomcat.valve

TomcatPropertySet.CUSTOM_VALVE

(tick)

N/A

(green star)

cargo.tomcat.webappsDirectory

TomcatPropertySet.WEBAPPS_DIRECTORY

(tick)

webapps

(green star)

cargo.tomcat.webappsLegacyDirectory

TomcatPropertySet.WEBAPPS_LEGACY_DIRECTORY

(tick)

webapps-javaee

(green star)

Datasource and Resource configuration

In addition to the forementioned properties, this container configuration can also set up datasources and/or resources.

For more details, please read: DataSource and Resource Support.

Configuring HTTP/2 for Tomcat 8.5 and above

Tomcat 8.5 and above support HTTP/2.

For further information on how to enable this, please refer to Configuring HTTP/2 for Tomcat 8.5 and above.

For embedded container o.c.c.c.tomcat.Tomcat11xEmbeddedLocalContainer

Property name

Java Property

Supported?

Default value

Javadoc

cargo.hostname

GeneralPropertySet.HOSTNAME

(tick)

localhost

(green star)

cargo.java.home

GeneralPropertySet.JAVA_HOME

(tick)

JAVA_HOME version 17 (up to and including Tomcat 11.0.0 M6) or 21 (Tomcat 11.0.0 M7 onwards) or newer

(green star)

cargo.jvmargs

GeneralPropertySet.JVMARGS

(tick)

N/A

(green star)

cargo.logging

GeneralPropertySet.LOGGING

(tick)

medium

(green star)

cargo.port.offset

GeneralPropertySet.PORT_OFFSET

(tick)

0

(green star)

cargo.protocol

GeneralPropertySet.PROTOCOL

(tick)

http

(green star)

cargo.rmi.port

GeneralPropertySet.RMI_PORT

(tick)

8205

(green star)

cargo.runtime.args

GeneralPropertySet.RUNTIME_ARGS

(tick)

N/A

(green star)

cargo.servlet.port

ServletPropertySet.PORT

(tick)

8080

(green star)

cargo.servlet.users

ServletPropertySet.USERS

(tick)

admin::manager-script

(green star)

cargo.standalone.ignoreNonExistingProperties

GeneralPropertySet.IGNORE_NON_EXISTING_PROPERTIES

(tick)

N/A

(green star)

cargo.start.jvmargs

GeneralPropertySet.START_JVMARGS

(tick)

N/A

(green star)

cargo.tomcat.ajp.port

TomcatPropertySet.AJP_PORT

(tick)

8009

(green star)

cargo.tomcat.connector.httpUpgradeProtocol

TomcatPropertySet.CONNECTOR_HTTP_UPGRADE_PROTOCOL

(tick)

N/A

(green star)

cargo.tomcat.connector.keystoreFile

TomcatPropertySet.CONNECTOR_KEY_STORE_FILE

(tick)

N/A

(green star)

cargo.tomcat.connector.keystorePass

TomcatPropertySet.CONNECTOR_KEY_STORE_PASSWORD

(tick)

N/A

(green star)

cargo.tomcat.connector.keystoreType

TomcatPropertySet.CONNECTOR_KEY_STORE_TYPE

(tick)

RSA

(green star)

cargo.tomcat.connector.maxHttpHeaderSize

TomcatPropertySet.CONNECTOR_MAX_HTTP_HEADER_SIZE

(tick)

N/A

(green star)

cargo.tomcat.connector.protocolClass

TomcatPropertySet.CONNECTOR_PROTOCOL_CLASS

(tick)

N/A

(green star)

cargo.tomcat.context.allowCasualMultipartParsing

TomcatPropertySet.CONTEXT_ALLOW_MULTIPART

(tick)

true

(green star)

cargo.tomcat.context.mapJarToWebinfClasses

TomcatPropertySet.CONTEXT_MAP_JARS_TO_WEBINF_CLASSES

(tick)

false

(green star)

cargo.tomcat.context.reloadable

TomcatPropertySet.CONTEXT_RELOADABLE

(tick)

false

(green star)

cargo.tomcat.copywars

TomcatPropertySet.COPY_WARS

(tick)

true

(green star)

cargo.tomcat.embedded.overrideJavaLogging

TomcatPropertySet.EMBEDDED_OVERRIDE_JAVA_LOGGING

(tick)

false

(green star)

cargo.tomcat.host.startStopThreads

TomcatPropertySet.HOST_START_STOP_THREADS

(tick)

N/A

(green star)

cargo.tomcat.uriencoding

TomcatPropertySet.URI_ENCODING

(tick)

UTF-8

(green star)

cargo.tomcat.useHttpOnly

TomcatPropertySet.USE_HTTP_ONLY

(tick)

N/A

(green star)

cargo.tomcat.valve

TomcatPropertySet.CUSTOM_VALVE

(tick)

N/A

(green star)

cargo.tomcat.webappsDirectory

TomcatPropertySet.WEBAPPS_DIRECTORY

(tick)

webapps

(green star)

cargo.tomcat.webappsLegacyDirectory

TomcatPropertySet.WEBAPPS_LEGACY_DIRECTORY

(tick)

webapps-javaee

(green star)

Datasource and Resource configuration

In addition to the forementioned properties, this container configuration can also set up datasources and/or resources.

For more details, please read: DataSource and Resource Support.

Configuring HTTP/2 for Tomcat 8.5 and above

Tomcat 8.5 and above support HTTP/2.

For further information on how to enable this, please refer to Configuring HTTP/2 for Tomcat 8.5 and above.

Existing Local Configuration Properties

For installed container o.c.c.c.tomcat.Tomcat11xInstalledLocalContainer
For embedded container o.c.c.c.tomcat.Tomcat11xEmbeddedLocalContainer

Runtime Configuration Properties

For remote container o.c.c.c.tomcat.Tomcat11xRemoteContainer

With Tomcat 11, the Tomcat manager has multiple aspects to be careful about:

  • Your browser by default accesses the HTML-based manager whereas Codehaus Cargo needs to use the text-based manager. As a result, if you want to set the RemotePropertySet.URI manually, please make sure you set the URL for the text-based manager, for example http://production27:8080/manager/text
  • The text-based manager requires to be accessed by a user with the manager-script role; and by default no user has that role. As a result, please make sure you modify your tomcat-users.xml file to give that role to a user.
    You can read more in the Tomcat documentation: https://tomcat.apache.org/tomcat-11.0-doc/manager-howto.html

Tested On

This container is automatically tested by the Continous Integration system every time there is a code change.
The server used for tests is downloaded from: https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat/11.0.2/tomcat-11.0.2.zip

Copyright 2004-2024. All rights reserved unless otherwise noted.
Click here to read our privacy and cookie policy