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

Editing server.xml

The structure of server.xml is a hierarchy, with server as the topmost element. The server element has many subelements, many of which have subelements of their own.

In general, you do not need to edit server.xml directly. Instead, use the Admin Console and the wadm command-line interface to change values in server.xml. Using wadm when creating scripts to change server.xml assures you of forward compatibility. If you do edit server.xml directly, exercise caution to make sure that the resulting server.xml file is valid.

Editing Element Values

To change the values in server.xml, change the value between the tags associated with the element you are editing. For example, to change the log level from info to fine, find the log child element of the server element. In this example, you see the following lines:


To change the log level from info to fine, change the line:




After you make changes to the server.xml file, you must deploy your configuration for most changes to take effect. Use the command-line interface command wadm pull-config to pull the modified server.xml file, then use the Admin Console or the wadm deploy-config command to deploy your changes. For some changes, you must restart the server before they take effect. For information on which changes require a restart and which do not, see Dynamic Reconfiguration.

Adding Elements

To add a new element to sever.xml, add the element and any required subelements. Elements begin with a tag, for example <virtual-server>, and end with the closing tag, for example </virtual-server>. The tags are case-sensitive.

Validating server.xml

After editing server.xml, Web Server automatically validates the XML when you start or dynamically reconfigure a the server.

You can also use the –cofigtest option of the startserv script to validate your configuration. From the instance's bin directory, run:

startserv –configtest