Cargo : Passing system properties
This page last changed on Jul 17, 2005 by vmassol.
DefinitionHow to pass system properties that will be available to the container while executing ExplanationsIt is sometime useful to pass system properties to the container that is executing. These properties are then available to the code executing in the container. Example using the Java APIStarting Tomcat 3.x with some System properties set in the container JVM: Container container = new Tomcat3xContainer( new TomcatStandaloneConfiguration("target/tomcat3x")); container.setHomeDir("c:/apps/jakarta-tomcat-3.3.2"); Map props = new HashMap(); props.put("mypropery", "myvalue"); container.setSystemProperties(props); container.start(); Example using the Ant APIStarting Tomcat 3.x with some System properties set in the container JVM: <cargo-tomcat3x homeDir="c:/apps/jakarta-tomcat-3.3.2" action="start"> <sysproperty key="myproperty" value="myvalue"/> </cargo-tomcat3x> |
![]() |
Document generated by Confluence on Jul 21, 2005 06:52 |