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:
Syntax
tomcat <command> [
<option_1> [<param>]
[<option_2> [<param>]]
…[<option_N> [<param>]]
]
Example
The following command line installs a new Java-based Web application from file /usr/local/siteapps/webapp1.war on domain example.com:
# ./tomcat --install /usr/local/siteapps/webapp1.war -domain example.com
Commands
Command |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Installs a Java-based Web application on a domain. Requires concomitant use of the |
To install a Web application from file /usr/local/siteapps/webapp1.war on domain example.com: # ./tomcat --install /usr/local/siteapps/webapp1.war -domain example.com or # ./tomcat -i /usr/local/siteapps/webapp1.war -domain example.com |
|
|
Deletes a Java-based web application from a domain. Requires concomitant use of the |
To delete Web application WebApp1 from domain example.com: # ./tomcat --remove webapp1 -domain example.com or # ./tomcat -r webapp1 -domain example.com |
|
|
Updates a domain's Tomcat service status. |
To enable Tomcat service on domain example.com: # ./tomcat --update-service example.com -status enabled |
|
|
Updates a Java-based web application status. Requires concomitant use of the |
To start Web application WebApp1 on domain example.com: # ./tomcat --update webapp1 -domain example.com -status enabled or # ./tomcat -r webapp1 -domain example.com -status enabled |
|
|
Displays help on the use of the utility. |
To view help on the use of the utility: # ./tomcat --help or # ./tomcat -h |
Options
Option |
Parameter |
Description |
Example |
|---|---|---|---|
|
|
Specifies a domain on which a Java application is to be installed or updated. |
To install a Web application from file /usr/local/siteapps/webapp1.war on domain example.com: # ./tomcat -i /usr/local/siteapps/webapp1.war -domain example.com |
|
|
Enables or disables Tomcat service or a Java application on a domain (the |
To enable the webapp application on domain example.com: # ./tomcat --update webapp -status enabled -domain example.com
To set the status of the Tomcat service on domain example.com to the status of the domain: # ./tomcat --update-service example.com -status parent |