All configuration files support the definition of references to operating system and Java variables.
In all operating system you can define variables.
Example (Windows):
set xyzValue=c:\temp
catalina jpda run
Inside the configuration file you can reference this value by the expression "${env.xyzValue}".
Example:
...
...directory="${env.xyzValue}/log/cc/"...
...
These are the ones passed as "-D" parameters when calling java.exe.
Example (Windows):
set JAVA_OPTS=-Xmx1000m -Xms128m -DxyzValue=C:\temp
catalina jpda run
Inside the configuration file you can reference this value by the expression "${sys.xyzValue}".
Example:
...
...directory="${sys.xyzValue}/log/cc/"...
...
Inside the configuration file you can reference the current web context name with the expression "${webappName}". If the application is running directly as root context then the value returned is "root".