Adding and removing Liberty features

Features are the units of functionality by which you control the pieces of the runtime environment that are loaded into a particular server. To add or remove a Liberty feature, you add or remove an XML snippet in the <feature> subelement of the server.xml configuration file. When you add or remove Liberty features, the changes are applied dynamically.

For distributed platforms

Before you begin

You can add and remove Liberty features as described in this topic, or as described in Editing the Liberty configuration by using developer tools.

About this task

For a list of the main Liberty features, including the XML snippets that enable them, see Liberty features.


To add or remove Liberty features, complete the following steps:

  1. Open the server.xml configuration file for editing.

    Where path_to_liberty is the location you installed Liberty on your operating system, and server_name is the name of your server.

    You can do this using a text editor. By default, the path and file name for the configuration root document file is path_to_liberty/wlp/usr/servers/server_name/server.xml. However, you can change the path. See Customizing the Liberty environment.

  2. Add or remove features in the configuration file.
    The set of features is enclosed within the <featureManager> element, and each feature within the <feature> subelement. For example:
    The matching of feature names is not case-sensitive; the following example is also a valid server configuration:
  3. Save the changes to the configuration file.


Your changes are applied. If the server is running, the changes are applied dynamically.