cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <>
Subject Re: [2.2] Configuration
Date Tue, 23 May 2006 15:04:25 GMT
Reinhard Poetz wrote:
> Carsten Ziegeler wrote:
>> It was in some readme in the root directory; I guess it moved to
>> somewhere else during the great refactoring?
> hmm, can't find it in 
> :-(
It was in install.txt: here is the text I orginally committed - but I
think others changed the text afterwards:

Choosing the running mode
Cocoon comes with a smart configuration mechanism based on "running
modes". The
configuration of Cocoon is based on XML files for the various components. To
customize these configuration files you can define properties to which you
can refer to from within the configuration files.
You can define as many property files and define your own properties as
you want.
Store them in the WEB-INF/properties directory and Cocoon will read all of
them on start up. You can then refer to the values of the properties by
using the common ${PROPERTY_NAME} syntax in your configuration file.
In addition Cocoon supports running modes. You define a running mode when
you start Cocoon (default is "dev"). Now this name of the running mode is
used to read additional property files on startup. Cocoon reads first all
property files from "WEB-INF/properties" and then from
"WEB-INF/properties/${RUNNING_MODE}". For example if you have different
database connections during development and in production, just put
a properties file containing the connection information for development
in the "WEB-INF/properties/dev" directory and put another property file
with the production settings in "WEB-INF/properties/prod".
You can easily switch the running mode by setting the system property
"org.apache.cocoon.mode" on startup of Cocoon ,for example:
Note, that "dev" and "prod" are not predefined. So you can create a
"myenv" directory underneath the properties directory and set the
running mode to "myenv" etc.

Carsten Ziegeler - Open Source Group, S&N AG

View raw message