You can use the Server Config tool to view and edit server configuration files in the Liberty topology. The Server Config tool displays
configuration files such as a server.xml file in two modes. The Design mode
displays the content of configuration files using graphical controls with inline documentation. The
Source mode provides direct access to the file text and has content assist capabilities. You can
customize the modes, for example, to add or remove parameter descriptions on the Design mode or to
add or remove line numbers on the Source mode. Before you can edit files, you must add a
remoteFileAccess
element to the server configuration file; otherwise, files are
shown in read-only mode.
In version 21.0.0.4 and
later, see the Open Liberty website for Admin Center documentation.
About this task
You can view and edit configuration files for Liberty servers that use the
adminCenter-1.0
feature and for Liberty collective members that are not in Docker
containers. You cannot view and edit configuration files for Liberty collective members in Docker containers
or for Node.js collective members.
Watch: The Getting
started with the Server Configuration Tool for WebSphere Liberty video shows how to enable
and use the tool.
Attention: To save changes to server configuration files in Admin Center, the user must
be in the administrator role.
Procedure
-
Enable editing of files in the server configuration directory.
-
Open an editor on the server configuration file.
The configuration file for a server typically has a path name such as
wlp/usr/servers/server_name/server.xml.
-
Add the following
remoteFileAccess
element to the server configuration
file.
<remoteFileAccess>
<writeDir>${server.config.dir}</writeDir>
</remoteFileAccess>
-
Save the file changes.
After you enable editing, server configuration files such as the server.xml
and any included files no longer are read-only in the Server Config tool. You can change element and
parameter settings, and otherwise edit the files.
-
View or edit a configuration file in the Server Config tool.
-
From the Toolbox, select Server Config .
-
If Admin Center is run on a collective controller,
select the server that has the configuration file you want to view or edit.
-
After a file is open for editing, you can switch between Design and
Source modes.
In the Design mode, select elements in the configuration to see enabled features and parameter
settings.
In the Source mode, hover on elements and parameters to view their documentation. You can press
Ctrl+Space to use content assist, which helps you add new elements, parameters, and values.
- After you finish working with a file, select Save to save the
file changes and then Close to return to the main page of the tool. To
discard file changes, select Close and then confirm to not save the
changes.
- Optional:
Customize the default settings for Design or Source mode.
By default, the Design mode uses enhanced labels for file elements. Enhanced labels display
element names such as featureManager
as Feature Manager
. Also, the
Design mode displays parameter descriptions by default. The Source mode displays line numbers by
default. To change a default setting:
-
Select Settings .
-
Enable or disable one or more default settings.
-
Select Close.
What to do next
To return to the Toolbox, select Toolbox .