Administering Liberty manually

You can administer Liberty from the command prompt, configure it with web server plug-ins, and capture its status. You can package a Liberty server configuration along with the applications that it runs, for distribution to colleagues, or installation on other systems. If available, you can use the Equinox OSGi console to aid with debugging.

About this task

The server.xml file is the primary configuration file for the server. You can edit this file, and the files it includes, in a text editor. You can also change the location of the server.xml file. However, for most configurations you do not need to do this.

The file is used to specify properties that need to be available before the main configuration is processed. If you update the file, you must restart the server for the changes to take effect.

Note: You need to escape specific XML characters in Liberty configuration files, such as the server.xml file, because Liberty does not automatically escape these characters. For more information, see Extensible Markup Language (XML) .


All the elements that can be configured in the server.xml file, and the files it includes, are described in Liberty features. However, the only required element is a server definition:
Beyond this server definition, you only specify overrides and additions to the default configuration values. For example, for transactions started on this server, you can set the maximum time that is allowed for each of the transactions to complete. To do this, you specify:
<transaction totalTranLifetimeTimeout="30s"/>
Some attributes can have multiple values. For example, you use a list of values to define the features that are to be provided by the server:
See also Adding and removing Liberty features.
Where multiple instances of a resource type can be configured, for example applications or data sources, you need only provide the attributes that are unique for the resource. You can let the other attributes use the default values, or override them as needed. Therefore the contents of the server.xml file can be brief. For example, here is a complete server configuration to run a web application:
     <application name="snoop" location="/mywebapps/snoop" id="snoop" type="war"/>

For detailed information about specific aspects of server configuration, see the subtopics.