Expression Language
Also available as:
PDF

hostname

Description: Returns the Hostname of the machine. An optional argument of type Boolean can be provided to specify whether or not the Fully Qualified Domain Name should be used. If false, or not specified, the hostname will not be fully qualified. If the argument is true but the fully qualified hostname cannot be resolved, the simple hostname will be returned.

Subject Type: No subject

Arguments:

  • Fully Qualified : Optional parameter that specifies whether or not the hostname should be fully qualified. If not specified, defaults to false.

Return Type: String

Examples: The fully qualified hostname of the machine can be obtained by using the Expression ${hostname(true)}, while the simple hostname can be obtained by using either ${hostname(false)} or simply ${hostname()}.