Section | |||||
---|---|---|---|---|---|
|
Setting Global Data
...
in _data properties file
To define your server-wide global data:
...
Info |
---|
Parameters defined in the _data.properties file can be retrieved using _data.getParameter in rules. Dynamic Labels, Help or Hints is an example showing how you can set the value of control labels, help and hints dynamically in a rule. |
Setting Global Data
...
in Configuration Files
Properties listed in the _data.properties can be overridden with properties prefixed by frevvo._data.<property name> in the following configuration files. Note the syntax for the properties has a dot before and after the _data.
- If you are using the frevvo tomcat bundle, you can add the frevvo._data properties in the:
- <frevvo-home>/tomcat/conf/catalina/localhost/frevvo.xml - this is the easier and recommended location as this file is located outside the frevvo.war.
- the web.xml file in the frevvo.war - this file is located in the frevvo.war file - the frevvo.war must be unzipped, the changes made and then rezipped. The modified frevvo.war must then be dropped into the <frevvo-home>\tomcat\webapps directory.
- frevvo-config.properties - this file is typically created by the System Administrator to override parameters in a container web.xml file. This file can be used for any container including tomcat.
This approach is helpful when deploying multiple environments. Let's say your organization has a Development, Production and UAT environment for . All three have the frevvo DB Connector configured for that environment. If you make a copy of Production environment and database to create your UAT environment, you would have to download the _data properties file, make the changes to point to the DB Connector in the UAT environment, then upload the file again.
It is easier to create property files with a frevvo._data.dbURL parameter pointing to the correct locations for each environment.
This parameter in the frevvo.xml file would look like this:
Code Block |
---|
<Parameter name="frevvo._data.dbURL" value="http://<server>:<port>/database/listManagers" override="false" /> |
The same parameter in the web.xml file would look like this:
Code Block |
---|
<context-param>
<param-name>frevvo._data.dbURL</param-name>
<param-value>http://<server>:<port>/database/listManagers</param-value>
</context-param> |
The same parameter in the frevvo-config.properties file would look like this:
Code Block |
---|
frevvo._data.dbURL=http://<server>:<port> |
As mentioned above, you can write the URL using a template such as {dbURLl}/database/listManagers. Then define the variable dbURL for the development, UAT and Production environments in the properties file you are using..