The superuser admin can configure server-wide global data. One common use is for forms deployed from a development/test form server to a production form server. You often need information such as Urls configured one way in your dev/test environment and another way in your production envirionment. For example, a database in the dev/test environment might be located at http://mytest:1024/database/listManagers and in your production environment at http://myprod:1044/database/listManagers.
makes deployment from dev/test to production easier by enabling you to configure global data variables. For example, rather than hard-coding the Url to your database server you can write the Url using a template such as {dbUrl}/database/listManagers. Then define variable dbUrl one way in dev/test and another way in production.
To see all the places where templates can be used, refer to the chapter Templatized Strings.
On This Page:
Setting Global Data using _data properties file
To define your server-wide global data:
- Click the Download icon. This will download an empty default _data.properties file.
- Add your global data to the _data.properties file. See below for an example of the syntax. Save the file.
- Login to the form server as the superuser admin
- Click Manage Default _data
- Click Browse...
- Locate your newly created _data.properties file.
- Click Upload.
- For subsequent edits of the _data.properties file, simply download the _data.properties file previously uploaded by clicking on the Download icon. Edit the file and upload the modified file as described above.
Here is an example of the syntax for a _data.properties file:
dbUrl=http://localhost:8080/database/listManagers ManagerName=Joe
You will see the following message when the _data.properties file has been successfully uploaded to :
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 using Configuration Files
Properties listed in the _data.properties can be overridden with properties prefixed by frevvo._data in the following configuration files:
- 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 is most often used when the container is not tomcat