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

choose

The choose function parses pipe-separated values from values and returns one at random.

Syntax

choose(values)

Arguments

The following table describes the argument for the expression function.

Table A–5 choose Argument

Argument 

Description 

values

The list of values to choose from, separated by the pipe character (|)

Example

The following obj.conf code demonstrates the use of choose to randomly select one of three images:

NameTrans fn="rewrite"
          from="/images/random"
          path="/images/$(choose('iwsvi.jpg|0061.jpg|webservervii.jpg'))"