Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
pom.xml Rename to Add to run maven liberty:start-server … Nov 20, 2018


To use the sample application, download and extract the [] ( file to your local directory.

Use the mvn install Maven command from the directory that contains the extracted .zip files to build the project and install it in your local repository. The command creates the displayCarTypes/target/liberty directory that contains your Liberty server, mpConfigServer, and starts the server in the background.

To stop the running server, run the Maven command mvn liberty:stop-server in the /displayCarTypes directory. To start the mpConfigServer, run the Maven command mvn liberty:start-server in the /displayCarTypes directory.

To access the sample application, visit the http://localhost:9080/car-types URL. Initially, this will show all 5 car types, SUV, Crossover, Coupe, Truck, and Convertible, since the contains the port value 9083.

The /displayCarTypes/src directory contains the file as shown throughout this guide. This file is where the port configuration property and its value are injected into the code. The variable has the default value of '9080'.


You can edit any of the following three files to change the port values or add the config_ordinal property to override the ordinal value of the configuration source. The configuration source with the highest ordinal value takes precedence. To save the changes on the Liberty server, run the Maven command 'mvn package' from the directory that contains the extracted files.

The injected port configuration value is static. Changes to these files only take effect at application startup. To restart the application, restart the mpConfigServer, as indicated above.

This properties file can be found in
/displayCarTypes/src/main/webapp/META-INF/. The default port value is 9081.


The server.env file can be found in
/displayCarTypes/src/main/liberty/config. The default port value is 9082.

The file can be found in /displayCarTypes/src/main/liberty/config. The default port value is 9083.

You can’t perform that action at this time.