Sun Java System Web Server 6.1 SP10 Administrator's Configuration File Reference


Some variables are defined in server.xml for use in the obj.conf file. The following file fragment defines a docroot variable:

<PROPERTY name="docroot" value="/server/docs/class2/acme" >

A docroot variable allows different document root directories to be assigned for different virtual servers. The variable is then used in the obj.conf file. For example:

NameTrans fn=document-root root="$docroot"

Using this docroot variable allows you to define different document roots for different virtual servers within the same virtual server class.

Format of a Variable

A variable is found in obj.conf when the following regular expression matches:


This expression represents a $ followed by one or more alphanumeric characters. A delimited version ("${property}") is not supported. To get a regular $ character, use $$ to have variable substitution.

The id Variable

A special variable, id, is always available within a VS element and refers to the value of the id attribute. It is predefined and cannot be overridden. The id attribute uniquely identifies a virtual server. For example:

<PROPERTY name=docroot value="/export/$id" >

If the id attribute of the parent VS element is myserver, the docroot variable is set to the value /export/myserver.

Other Important Variables

In a default installation, the following variables are used to configure various aspects of the server's operation. Unlike the $id variable, they are not predefined in the server, and they can be overridden.

General Variables

The following table lists general server.xml variables. The left column lists variables, and the right column lists descriptions of those variables.

Table 2–53 General Variables




The document root of the virtual server. Typically evaluated as the parameter to the document-root function in the obj.conf file.


The access log file for a virtual server. 

send-cgi Variables

The following table lists server.xml variables used by the send-cgi function in the obj.conf file. The left column lists variables, and the right column lists descriptions of those variables.

Table 2–54 send-cgi Variables




The value of the user CGI parameter.


The value of the group CGI parameter.


The value of the chroot CGI parameter.


The value of the dir CGI parameter.


The value of the nice CGI parameter.

For more information about the send-cgi function, see the Sun Java System Web Server 6.1 SP10 NSAPI Programmer’s Guide.

Variable Evaluation

Variables are evaluated when generating specific objectsets for individual virtual servers. Evaluation is recursive: variable values can contain other variables. For example:

   <VS ...> 
      <PROPERTY name=docroot value="$docrootbase/nonjava/$id" > 
      <PROPERTY name=docroot value="$docrootbase/java/$id" > 
   <PROPERTY name=docrootbase value="/export" > 

Variables in subelements override variables in the parent elements. For example, it is possible to set a variable for a class of virtual servers and override it with a definition of the same variable in an individual virtual server.