This page last changed on Jul 17, 2005 by vmassol.

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.

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 Valid values Description Example
cargo.servlet.port ServletPropertySet.PORT integer Port on which the Servlet/JSP container will listen to "8280"
cargo.hostname GeneralPropertySet.HOSTNAME string Host name on which the container will listen to "myserver"
cargo.logging GeneralPropertySet.LOGGING "low", "medium" or "high" Level representing the quantity of information we wish to log "medium"

Example using the Java API

Starting Tomcat 5.x on a specific port:

Configuration configuration = 
    new CatalinaStandaloneConfiguration("target/tomcat5x"));
configuration.setProperty(ServletPropertySet.PORT, "8081");
[...]

Example using the Ant API

Starting Tomcat 5.x on a specific port:

<cargo-tomcat5x homeDir="c:/apps/jakarta-tomcat-5.0.29" action="start">
  <configuration>
    <property name="cargo.servlet.port" value="8081"/>
  </configuration>
</cargo-tomcat5x>
Document generated by Confluence on Jul 21, 2005 06:52