Deploying applications in Liberty

You can deploy web applications, enterprise applications, and OSGi applications in Liberty. You deploy an application by either dropping the application into a previously defined dropins directory, or by adding an application entry to the server configuration.

For distributed platformsYou can also deploy applications to Liberty servers by using developer tools.

Before you begin

It is assumed that you have not disabled dynamic updates to the runtime configuration, as described in Controlling dynamic updates.

About this task

By default, the "dropins" directory is automatically monitored. If you drop an application into this directory, the application is automatically deployed on the server. Similarly, if the application is deleted from the directory, the application is automatically removed from the server. The "dropins" directory can be used for applications that do not require extra configuration, such as security role mapping. If you put your applications in the "dropins" directory, you must not include an entry for the application in the server configuration. Otherwise, the server tries to load the application twice and an error might occur. For applications that are not in the "dropins" directory, you specify the location by using an application entry in the server configuration. The location can be on the file system or at a URL.

Your application can be packaged as an archive file, a directory,or as a loose application where files are in multiple locations. For more information about loose applications, see Loose applications.

For applications in the "dropins" directory, the file name and file extension are used by the application monitor to determine the type of application, and to generate the application id and application name. For example, if the archive file or directory is named snoop.war, the application monitor assumes that the application is a web application and that the application id and application name is "snoop". For configured applications, the application type and name are specified.

For more information about the default directory structure and the properties that are associated with directories (for example server.config.dir), see Liberty: Directory locations and properties.

Note: If you modify an application in the "dropins" directory, the application is restarted unless the change is to a component of a WAR file outside of the WEB-INF folder.
Note: Restrictions apply when you use the "dropins" directory in a production environment. See Versioning is not possible for applications in the dropins directory

Procedure

What to do next

For all deployed applications, you can configure whether application monitoring is enabled and how often to check for updates to applications. For the "dropins" directory, you can also configure the name and location of the directory and choose whether to deploy the applications that are in the directory. See Controlling dynamic updates.

Icon that indicates the type of topic Task topic

File name: twlp_dep.html