The tomcat utility is used to manage the Tomcat service and the Java-based Web applications on domains through CLI. By using this utility, you can perform the following tasks:

  • installing Java-based Web applications on a domain
  • changing status of the Tomcat service on a domain
  • changing statuses of Java-based Web applications on a domain

Usage

tomcat <command> [
<option_1> [<param>]
[<option_2> [<param>]]
... [<option_N> [<param>]]
]

Example

The following command installs a new Java-based Web application from file /usr/local/siteapps/storefront.war on the domain example.com:

plesk bin tomcat --install /usr/local/siteapps/storefront.war -domain example.com

Commands

Command Parameter Description Example
--install or -i <file_name>

Installs a Java-based Web application on a domain.

Requires the -domain option.

To install the web application from the file /usr/local/siteapps/storefront.war on the domain example.com:

plesk bin tomcat --install /usr/local/siteapps/storefront.war -domain example.com

or

plesk bin tomcat -i /usr/local/siteapps/storefront.war -domain example.com

--remove or -r <webapp_name>

Deletes a Java-based web application from a domain.

Requires the -domain option.

To delete web application storefront from the domain example.com:

plesk bin tomcat --remove storefront -domain example.com

or

plesk bin tomcat -r storefront -domain example.com

--update-service <domain_name> Updates a domain’s Tomcat service status.

To enable Tomcat service on the domain example.com:

plesk bin tomcat --update-service example.com -status enabled

--update <webapp_name>

Updates a Java-based web application status.

Requires the -domain option.

To start web application storefront on the domain example.com:

plesk bin tomcat --update storefront -domain example.com -status enabled

--help or -h   Displays help on the use of the utility.

To view help on the use of the utility:

plesk bin tomcat --help

or

plesk bin tomcat -h

Options

Option Parameter Description Example
-domain <domain_ame> Specifies a domain on which a Java application is to be installed or updated.

To install the web application from the file /usr/local/siteapps/storefront.war on the domain example.com:

plesk bin tomcat -i /usr/local/siteapps/storefront.war -domain example.com

-no-restart  

Prohibits restart Tomcat service.

Used with --update-service and --install.

To install the web application from the file /usr/local/siteapps/storefront.war on the domain example.com and to prohibit restart Tomcat service after installation:

plesk bin tomcat --install /usr/local/siteapps/storefront.war -domain example.com -no-restart

-status enabled|disabled|admin,domadm,parent,client

Enables/Disables Tomcat service or a Java application on a domain (the enabled or disabled parameters, respectively).

Disables Tomcat service or a Java application and sets the Tomcat service or a Java application status to “disabled by administrator” (admin) or “disabled by client” (client).

Sets the Tomcat service or a Java application status to the status of the domain (parent).

The use of the domadm parameter is restricted; the parameter should not be used for changing the service or application status.

To enable the web application storefront on domain example.com:

plesk bin tomcat --update storefront -status enabled -domain example.com

To set the status of the Tomcat service on the domain example.com to the status of the domain:

plesk bin tomcat --update-service example.com -status parent