Sun Java System Web Server 7.0 Update 6 Administrator's Configuration File Reference

Using Expressions in Interpolated Strings

To include the result of an expression in a string, prefix the expression with $(and follow it with ). For example, the following two strings are identical after interpolation:

"$(2 + 2)"


When an interpolated string is used as an obj.conf parameter, the string is interpolated each time the corresponding instruction is executed. For example, the following lines could be used in obj.conf to redirect clients based on the requested URI and the contents of the file redirect.conf:

<Object ppath="/redirect/*">
NameTrans fn="redirect" url="$(lookup('redirect.conf', $uri, '/'))"

In this example, the expression lookup('redirect.conf', $uri, '/') is evaluated each time the NameTrans directive is invoked, and the result is passed to the redirect SAF in its url parameter. For more information on the redirect SAF, see redirect. For more information on the lookup expression function, see lookup.