# Codehaus Cargo : Tomcat 8.x

Created by S. Ali Tokmen, last modified on Jan 02, 2026

This page has been automatically generated by Cargo's build. Do not edit it directly as it'll be overwritten next time it's generated again.

### Container Features

Feature name | Java API | Ant tasks | Maven 3 plugin | Comment
--- | --- | --- | --- | ---
Container Instantiation | `ContainerFactory.createContainer("tomcat8x"...)` | `<cargo containerId="tomcat8x".../>` | `<containerId>tomcat8x</containerId>` |
Local Container |  |  |  |
Container Classpath |  |  |  |
Container Start |  |  |  |
Container Stop |  |  |  |
Container Timeout |  |  |  |
Embedded Container | `o.c.c.c.tomcat.Tomcat8xEmbeddedLocalContainer` |  |  |
Installed Container | `o.c.c.c.tomcat.Tomcat8xInstalledLocalContainer` |  |  |
Passing system properties |  |  |  |
Installer |  |  |  |
Remote Container | `o.c.c.c.tomcat.Tomcat8xRemoteContainer` |  |  |

Running multiple Tomcat 7.x / Tomcat 8.x / Tomcat 9.x / Tomcat 10.x embedded containers within the same JVM

Tomcat 7.x has introduced a class called `TomcatURLStreamHandlerFactory` where the singleton has a static `instance` field and a final `registered` attribute which are not always in sync and cause unexpected exceptions. Due to this, it is not possible to execute Tomcat 7.x, Tomcat 8.x, Tomcat 9.x and Tomcat 10.x embedded in the same JVM, in addition running one of these Tomcat embedded versions one after the other within the same JVM but different classpaths might also fail.

If you want to be safe, prefer using the Installed Container. Also note that Tomcat 11.x onwards has gotten rid of that class.

### Configuration Features

Feature name | Java API | Ant tasks | Maven 3 plugin | Comment
--- | --- | --- | --- | ---
Standalone Local Configuration for installed container | `o.c.c.c.tomcat.Tomcat8xStandaloneLocalConfiguration` |  |  |
Standalone Local Configuration for embedded container | `o.c.c.c.tomcat.Tomcat8xStandaloneLocalConfiguration` |  |  |
Existing Local Configuration for installed container | `o.c.c.c.tomcat.TomcatExistingLocalConfiguration` |  |  |
Existing Local Configuration for embedded container | `o.c.c.c.tomcat.TomcatExistingLocalConfiguration` |  |  |
Runtime Configuration | `o.c.c.c.tomcat.Tomcat8xRuntimeConfiguration` |  |  |
Static deployment of WAR |  |  |  |
Static deployment of expanded WAR |  |  |  |
Static deployment of EJB |  |  |  |
Static deployment of EAR |  |  |  |
Static deployment of RAR |  |  |  |
Static deployment of files |  |  |  |
Static deployment of OSGi Bundles |  |  |  |

### Deployer Features

Feature name | Java API | Ant tasks | Maven 3 plugin | Comment
--- | --- | --- | --- | ---
Installed Deployer | `o.c.c.c.tomcat.TomcatCopyingInstalledLocalDeployer` |  |  |
Embedded Deployer | `o.c.c.c.tomcat.TomcatEmbeddedLocalDeployer` |  |  |
Remote Deployer | `o.c.c.c.tomcat.Tomcat8xRemoteDeployer` |  |  |

### Other Features

Feature name | Java API | Ant tasks | Maven 3 plugin | Comment
--- | --- | --- | --- | ---
Debugging |  |  |  |

### 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.Tomcat8xInstalledLocalContainer

Property name | Java Property | Supported? | Default value | Javadoc
--- | --- | --- | --- | ---
cargo.hostname | GeneralPropertySet.HOSTNAME |  | `localhost` |
cargo.java.home | GeneralPropertySet.JAVA_HOME |  | JAVA_HOME version 7 or newer |
cargo.jvmargs | GeneralPropertySet.JVMARGS |  | N/A |
cargo.logging | GeneralPropertySet.LOGGING |  | `medium` |
cargo.port.offset | GeneralPropertySet.PORT_OFFSET |  | `0` |
cargo.process.spawn | GeneralPropertySet.SPAWN_PROCESS |  | `false` |
cargo.protocol | GeneralPropertySet.PROTOCOL |  | `http` |
cargo.rmi.port | GeneralPropertySet.RMI_PORT |  | `8205` |
cargo.runtime.args | GeneralPropertySet.RUNTIME_ARGS |  | N/A |
cargo.servlet.port | ServletPropertySet.PORT |  | `8080` |
cargo.servlet.users | ServletPropertySet.USERS |  | `admin::manager-script` |
cargo.standalone.ignoreNonExistingProperties | GeneralPropertySet.IGNORE_NON_EXISTING_PROPERTIES |  | N/A |
cargo.start.jvmargs | GeneralPropertySet.START_JVMARGS |  | N/A |
cargo.tomcat.ajp.port | TomcatPropertySet.AJP_PORT |  | `8009` |
cargo.tomcat.connector.httpUpgradeProtocol | TomcatPropertySet.CONNECTOR_HTTP_UPGRADE_PROTOCOL |  | N/A |
cargo.tomcat.connector.keystoreFile | TomcatPropertySet.CONNECTOR_KEY_STORE_FILE |  | N/A |
cargo.tomcat.connector.keystorePass | TomcatPropertySet.CONNECTOR_KEY_STORE_PASSWORD |  | N/A |
cargo.tomcat.connector.maxHttpHeaderSize | TomcatPropertySet.CONNECTOR_MAX_HTTP_HEADER_SIZE |  | N/A |
cargo.tomcat.connector.protocolClass | TomcatPropertySet.CONNECTOR_PROTOCOL_CLASS |  | N/A |
cargo.tomcat.context.allowCasualMultipartParsing | TomcatPropertySet.CONTEXT_ALLOW_MULTIPART |  | `true` |
cargo.tomcat.context.mapJarToWebinfClasses | TomcatPropertySet.CONTEXT_MAP_JARS_TO_WEBINF_CLASSES |  | `false` |
cargo.tomcat.context.reloadable | TomcatPropertySet.CONTEXT_RELOADABLE |  | `false` |
cargo.tomcat.copywars | TomcatPropertySet.COPY_WARS |  | `true` |
cargo.tomcat.host.startStopThreads | TomcatPropertySet.HOST_START_STOP_THREADS |  | N/A |
cargo.tomcat.uriencoding | TomcatPropertySet.URI_ENCODING |  | `UTF-8` |
cargo.tomcat.useHttpOnly | TomcatPropertySet.USE_HTTP_ONLY |  | N/A |
cargo.tomcat.valve | TomcatPropertySet.CUSTOM_VALVE |  | N/A |
cargo.tomcat.webappsDirectory | TomcatPropertySet.WEBAPPS_DIRECTORY |  | `webapps` |

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.Tomcat8xEmbeddedLocalContainer

Property name | Java Property | Supported? | Default value | Javadoc
--- | --- | --- | --- | ---
cargo.hostname | GeneralPropertySet.HOSTNAME |  | `localhost` |
cargo.java.home | GeneralPropertySet.JAVA_HOME |  | JAVA_HOME version 7 or newer |
cargo.jvmargs | GeneralPropertySet.JVMARGS |  | N/A |
cargo.logging | GeneralPropertySet.LOGGING |  | `medium` |
cargo.port.offset | GeneralPropertySet.PORT_OFFSET |  | `0` |
cargo.protocol | GeneralPropertySet.PROTOCOL |  | `http` |
cargo.rmi.port | GeneralPropertySet.RMI_PORT |  | `8205` |
cargo.runtime.args | GeneralPropertySet.RUNTIME_ARGS |  | N/A |
cargo.servlet.port | ServletPropertySet.PORT |  | `8080` |
cargo.servlet.users | ServletPropertySet.USERS |  | `admin::manager-script` |
cargo.standalone.ignoreNonExistingProperties | GeneralPropertySet.IGNORE_NON_EXISTING_PROPERTIES |  | N/A |
cargo.start.jvmargs | GeneralPropertySet.START_JVMARGS |  | N/A |
cargo.tomcat.ajp.port | TomcatPropertySet.AJP_PORT |  | `8009` |
cargo.tomcat.connector.httpUpgradeProtocol | TomcatPropertySet.CONNECTOR_HTTP_UPGRADE_PROTOCOL |  | N/A |
cargo.tomcat.connector.keystoreFile | TomcatPropertySet.CONNECTOR_KEY_STORE_FILE |  | N/A |
cargo.tomcat.connector.keystorePass | TomcatPropertySet.CONNECTOR_KEY_STORE_PASSWORD |  | N/A |
cargo.tomcat.connector.maxHttpHeaderSize | TomcatPropertySet.CONNECTOR_MAX_HTTP_HEADER_SIZE |  | N/A |
cargo.tomcat.connector.protocolClass | TomcatPropertySet.CONNECTOR_PROTOCOL_CLASS |  | N/A |
cargo.tomcat.context.allowCasualMultipartParsing | TomcatPropertySet.CONTEXT_ALLOW_MULTIPART |  | `true` |
cargo.tomcat.context.mapJarToWebinfClasses | TomcatPropertySet.CONTEXT_MAP_JARS_TO_WEBINF_CLASSES |  | `false` |
cargo.tomcat.context.reloadable | TomcatPropertySet.CONTEXT_RELOADABLE |  | `false` |
cargo.tomcat.copywars | TomcatPropertySet.COPY_WARS |  | `true` |
cargo.tomcat.embedded.overrideJavaLogging | TomcatPropertySet.EMBEDDED_OVERRIDE_JAVA_LOGGING |  | `false` |
cargo.tomcat.host.startStopThreads | TomcatPropertySet.HOST_START_STOP_THREADS |  | N/A |
cargo.tomcat.uriencoding | TomcatPropertySet.URI_ENCODING |  | `UTF-8` |
cargo.tomcat.useHttpOnly | TomcatPropertySet.USE_HTTP_ONLY |  | N/A |
cargo.tomcat.valve | TomcatPropertySet.CUSTOM_VALVE |  | N/A |
cargo.tomcat.webappsDirectory | TomcatPropertySet.WEBAPPS_DIRECTORY |  | `webapps` |

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.Tomcat8xInstalledLocalContainer

Property name | Java Property | Supported? | Default value | Javadoc
--- | --- | --- | --- | ---
cargo.hostname | GeneralPropertySet.HOSTNAME |  | `localhost` |
cargo.java.home | GeneralPropertySet.JAVA_HOME |  | JAVA_HOME version 7 or newer |
cargo.jvmargs | GeneralPropertySet.JVMARGS |  | N/A |
cargo.port.offset | GeneralPropertySet.PORT_OFFSET |  | `0` |
cargo.process.spawn | GeneralPropertySet.SPAWN_PROCESS |  | `false` |
cargo.protocol | GeneralPropertySet.PROTOCOL |  | `http` |
cargo.runtime.args | GeneralPropertySet.RUNTIME_ARGS |  | N/A |
cargo.servlet.port | ServletPropertySet.PORT |  | `8080` |
cargo.start.jvmargs | GeneralPropertySet.START_JVMARGS |  | N/A |

##### For embedded container o.c.c.c.tomcat.Tomcat8xEmbeddedLocalContainer

Property name | Java Property | Supported? | Default value | Javadoc
--- | --- | --- | --- | ---
cargo.hostname | GeneralPropertySet.HOSTNAME |  | `localhost` |
cargo.java.home | GeneralPropertySet.JAVA_HOME |  | JAVA_HOME version 7 or newer |
cargo.jvmargs | GeneralPropertySet.JVMARGS |  | N/A |
cargo.port.offset | GeneralPropertySet.PORT_OFFSET |  | `0` |
cargo.protocol | GeneralPropertySet.PROTOCOL |  | `http` |
cargo.runtime.args | GeneralPropertySet.RUNTIME_ARGS |  | N/A |
cargo.servlet.port | ServletPropertySet.PORT |  | `8080` |
cargo.start.jvmargs | GeneralPropertySet.START_JVMARGS |  | N/A |
cargo.tomcat.embedded.overrideJavaLogging | TomcatPropertySet.EMBEDDED_OVERRIDE_JAVA_LOGGING |  | `false` |

#### Runtime Configuration Properties

##### For remote container o.c.c.c.tomcat.Tomcat8xRemoteContainer

Property name | Java Property | Supported? | Default value | Javadoc
--- | --- | --- | --- | ---
cargo.hostname | GeneralPropertySet.HOSTNAME |  | `localhost` |
cargo.protocol | GeneralPropertySet.PROTOCOL |  | `http` |
cargo.remote.password | RemotePropertySet.PASSWORD |  | N/A |
cargo.remote.timeout | RemotePropertySet.TIMEOUT |  | `7200000` |
cargo.remote.uri | RemotePropertySet.URI |  | N/A |
cargo.remote.username | RemotePropertySet.USERNAME |  | N/A |
cargo.servlet.port | ServletPropertySet.PORT |  | `8080` |
cargo.tomcat.deploy.update | TomcatPropertySet.DEPLOY_UPDATE |  | `false` |
cargo.tomcat.undeploy.allVersions | TomcatPropertySet.UNDEPLOY_ALL_VERSIONS |  | `false` |

With Tomcat 8, 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-8.0-doc/manager-howto.html

### Tested On

This container is automatically tested by the Continous Integration (CI) 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/8.5.100/tomcat-8.5.100.zip

Moreover, the below other branch is also tested by the CI system:

- https://repo.maven.apache.org/maven2/org/apache/tomcat/tomcat/8.0.53/tomcat-8.0.53.zip

Branches not tested by the CI might not be consistently supported.