+

Search Tips   |   Advanced Search

Use variables in configuration files

Use variables to avoid hardcoding values that might not be appropriate when the configuration is reused in different environments.

Variables can be defined by setting a property in any of the following places:

The following predefined variables can be referenced:

Variables specific to a particular server, for example port numbers, are specified in bootstrap.properties, allowing server.xml to be shared across multiple servers, while keeping those values different in each server. Variables shared across a group of servers, for example database configuration for a particular host, is better specified in an xml file included into the parent configuration file.

Variable names must begin with an alphabetic character, and must contain the following characters only: alphabetic characters, numeric characters, and the "_" and "." characters.


Parent topic: Use include elements, variables, and Ref tags in configuration files