Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 16 Next »

Definition

Properties to configure a container (request port, shutdown port, logging level, threads, etc)

Explanations

It is possible to set container configuration properties using the Cargo API. These properties are applied to a Configuration.

Using the Java API you can check if a configuration supports a given property by using {Configuration.getCapability().supportsProperty(String propertyName)}}.

For example if you want to check if the configuration supports setting the port property:

There are 2 kinds of properties:

  • General properties
  • Container-specific properties. See each container's page for a list of the custom properties it supports.

General properties:

Property name

Java constant to use

Description

Valid values

Default value

Example

cargo.hostname

GeneralPropertySet.HOSTNAME

Host name on which the container listens to

string

"localhost"

"myserver"

cargo.logging

GeneralPropertySet.LOGGING

Level representing the quantity of information we wish to log

"low", "medium" or "high"

"medium"

"high"

cargo.servlet.port

ServletPropertySet.PORT

Port on which the Servlet/JSP container listens to

integer

"8080"

"8280"

Example using the Java API

Starting Tomcat 5.x on port 8081:

Example using the Ant tasks

Starting Tomcat 5.x on port 8081:

Example using the Maven 2 plugin

Starting Tomcat 5.x on port 8081:

  • No labels