# Codehaus Cargo : Jetty 12.x

Created by S. Ali Tokmen, last modified on Oct 14, 2025

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.

Jetty 12.x onwards support various versions of Jakarta EE, by adapting the `JettyPropertySet.MODULES` and `JettyPropertySet.DEPLOYER_EE_VERSION` configuration properties accordingly.

Users of the Jakarta EE 9 and above versions 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 EE 9 and later.

### Container Features

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

### Configuration Features

Feature name | Java API | Ant tasks | Maven 3 plugin | Comment
--- | --- | --- | --- | ---
Standalone Local Configuration for installed container | `o.c.c.c.jetty.Jetty12xStandaloneLocalConfiguration` |  |  |
Standalone Local Configuration for embedded container | `o.c.c.c.jetty.Jetty12xEmbeddedStandaloneLocalConfiguration` |  |  |
Existing Local Configuration for installed container | `o.c.c.c.jetty.Jetty12xExistingLocalConfiguration` |  |  |
Existing Local Configuration for embedded container |  |  |  |
Runtime Configuration |  |  |  |
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.jetty.Jetty12xInstalledLocalDeployer` |  |  |
Embedded Deployer | `o.c.c.c.jetty.Jetty12xEmbeddedLocalDeployer` |  |  |
Remote Deployer |  |  |  |

### 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.jetty.Jetty12xInstalledLocalContainer

Property name | Java Property | Supported? | Default value | Javadoc
--- | --- | --- | --- | ---
cargo.hostname | GeneralPropertySet.HOSTNAME |  | `localhost` |
cargo.java.home | GeneralPropertySet.JAVA_HOME |  | JAVA_HOME version 17 or newer |
cargo.jetty.connector.https.port | JettyPropertySet.CONNECTOR_HTTPS_PORT |  | `9443` |
cargo.jetty.connector.keystoreFile | JettyPropertySet.CONNECTOR_KEY_STORE_FILE |  | N/A |
cargo.jetty.connector.keystorePass | JettyPropertySet.CONNECTOR_KEY_STORE_PASSWORD |  | N/A |
cargo.jetty.connector.keystoreType | JettyPropertySet.CONNECTOR_KEY_STORE_TYPE |  | N/A |
cargo.jetty.deployer.createContextXml | JettyPropertySet.DEPLOYER_CREATE_CONTEXT_XML |  | `true` |
cargo.jetty.deployer.ee.version | JettyPropertySet.DEPLOYER_EE_VERSION |  | `ee10` |
cargo.jetty.modules | JettyPropertySet.MODULES |  | `server,ext,http,ee10-annotations,ee10-plus,ee10-jsp,ee10-deploy` |
cargo.jetty.realm.name | JettyPropertySet.REALM_NAME |  | `Cargo Test Realm` |
cargo.jetty.servlet.default.useFileMappedBuffer | JettyPropertySet.USE_FILE_MAPPED_BUFFER |  | `true` |
cargo.jetty.session.path | JettyPropertySet.SESSION_PATH |  | N/A |
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.runtime.args | GeneralPropertySet.RUNTIME_ARGS |  | N/A |
cargo.servlet.port | ServletPropertySet.PORT |  | `8080` |
cargo.servlet.users | ServletPropertySet.USERS |  | N/A |
cargo.standalone.ignoreNonExistingProperties | GeneralPropertySet.IGNORE_NON_EXISTING_PROPERTIES |  | N/A |
cargo.start.jvmargs | GeneralPropertySet.START_JVMARGS |  | N/A |

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.

Since the Jetty 12.x `jetty-plus` modules are specific to EE versions, datasources and resources are deployed using each application's `context.xml` file, matching the EE version.

The below are hence pre-requisites to using datasources or resources in Jetty 12.x:

- `JettyPropertySet.DEPLOYER_CREATE_CONTEXT_XML` must must be set to `true`.
- `JettyPropertySet.MODULES` must contain the right `jetty-plus` modules for the application(s) in scope.
- `JettyPropertySet.DEPLOYER_EE_VERSION` must be set aligned with the `jetty-plus` module EE version mentioned above.

How to run Jetty under a Java Security Manager

Jetty 9.x and above can be configured to run under a Java Security Manager.

For further information on how to achieve this, please refer to the associated tip in the Maven 3 Plugin Tips page.

##### For embedded container o.c.c.c.jetty.Jetty12xEmbeddedLocalContainer

Property name | Java Property | Supported? | Default value | Javadoc
--- | --- | --- | --- | ---
cargo.hostname | GeneralPropertySet.HOSTNAME |  | `localhost` |
cargo.java.home | GeneralPropertySet.JAVA_HOME |  | JAVA_HOME version 17 or newer |
cargo.jetty.deployer.createContextXml | JettyPropertySet.DEPLOYER_CREATE_CONTEXT_XML |  | `true` |
cargo.jetty.deployer.ee.version | JettyPropertySet.DEPLOYER_EE_VERSION |  | `ee10` |
cargo.jetty.realm.name | JettyPropertySet.REALM_NAME |  | `Cargo Test Realm` |
cargo.jetty.servlet.default.useFileMappedBuffer | JettyPropertySet.USE_FILE_MAPPED_BUFFER |  | `true` |
cargo.jetty.session.path | JettyPropertySet.SESSION_PATH |  | N/A |
cargo.jvmargs | GeneralPropertySet.JVMARGS |  | N/A |
cargo.logging | GeneralPropertySet.LOGGING |  | `medium` |
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.servlet.users | ServletPropertySet.USERS |  | N/A |
cargo.standalone.ignoreNonExistingProperties | GeneralPropertySet.IGNORE_NON_EXISTING_PROPERTIES |  | N/A |
cargo.start.jvmargs | GeneralPropertySet.START_JVMARGS |  | N/A |

Jetty 12.x Embedded container and EE versions

Jetty 12.x supports multiple Java / Jakarta EE versions, for the Embedded container this is steered through the `JettyPropertySet.DEPLOYER_EE_VERSION` property.

When using this feature through the Java API or Ant tasks, you will have to set the classpath accordingly. The Maven 3 plugin for Jetty 12.x Embedded will resolve the right Jetty artifacts automagically based on the `cargo.jetty.deployer.ee.version` property of the container configuration.

#### Existing Local Configuration Properties

##### For installed container o.c.c.c.jetty.Jetty12xInstalledLocalContainer

Property name | Java Property | Supported? | Default value | Javadoc
--- | --- | --- | --- | ---
cargo.hostname | GeneralPropertySet.HOSTNAME |  | `localhost` |
cargo.java.home | GeneralPropertySet.JAVA_HOME |  | JAVA_HOME version 17 or newer |
cargo.jetty.connector.https.port | JettyPropertySet.CONNECTOR_HTTPS_PORT |  | `9443` |
cargo.jetty.connector.keystoreFile | JettyPropertySet.CONNECTOR_KEY_STORE_FILE |  | N/A |
cargo.jetty.connector.keystorePass | JettyPropertySet.CONNECTOR_KEY_STORE_PASSWORD |  | N/A |
cargo.jetty.connector.keystoreType | JettyPropertySet.CONNECTOR_KEY_STORE_TYPE |  | N/A |
cargo.jetty.deployer.ee.version | JettyPropertySet.DEPLOYER_EE_VERSION |  | `ee10` |
cargo.jetty.modules | JettyPropertySet.MODULES |  | `server,ext,http,ee10-annotations,ee10-plus,ee10-jsp,ee10-deploy` |
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 |

### 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/eclipse/jetty/jetty-home/12.1.2/jetty-home-12.1.2.tar.gz

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

- https://repo.maven.apache.org/maven2/org/eclipse/jetty/jetty-home/12.0.28/jetty-home-12.0.28.tar.gz

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