Berlioz Global Properties
/WEB-INF/config/config-[mode].xml
The Berlioz global configuration file is a simple file to provide a list of properties to the content generators running in Berlioz.
Any property defined in this file will be available in the content generators using the GlobalSettings
class.
Predefined Berlioz properties
The following properties are defined by Berlioz.
Name | Type | Default | Description |
---|---|---|---|
berlioz.http.compression | Boolean | true | To allow Berlioz to use HTTP compression when possible |
berlioz.http.get-via-post | Boolean | true | To forward HTTP POST requests to GET is there is no specific service for POST |
berlioz.http.max-age | Integer | 60 | The default maximum age in seconds of cacheable content |
berlioz.http.cache-control | String | "" | The default "Cache-Control" HTTP response header that Berlioz should use |
berlioz.errors.handle | Boolean | true | To allow Berlioz handle errors (they are sent to Web container |
berlioz.errors.generator-catch | Boolean | true | To catch errors thrown by generators |
berlioz.xslt.cache | Boolean | true | To enable the caching of XSLT templates |
berlioz.xml.parse-strict | Boolean | true | To throw XML/XSLT errors even for warnings |
berlioz.control-key | String | "" | Specifies a control Key: a string required to use Berlioz global |
File Format
There 3 possible file formats for the global settings:
Simple XML file
This is the simplest type of configuration. The name of the properties are generated using the concatenation of the attribute names and their parent element. The property value if the attribute value. The document element is ignored.
For example:
<global> <myapp test="abc" acme="true"/> </global>
Will create the following property:
Name | Value |
---|---|
myapp.acme | true |
myapp.test | abc |
XML properties file
This format is little terse and is a simple representation of a properties file as XML:
<?xml version="1.0"?> <!DOCTYPE service-config PUBLIC "-//Berlioz//DTD::Properties 1.0//EN" "http://www.weborganic.org/schema/berlioz/properties-1.0.dtd"> <properties> <root> <map/> <!-- Berlioz Global settings --> <node name="myapp"> <map> <entry key="test" value="abc"/> <entry key="acme" value="true"/> </map> </node> </root> </properties>
Warning!
It is recommended that you use the simple format instead.
Properties file
It is also possible to use a simple properties file.
myapp.test=abc myapp.acme=true
Created on , last edited on