Restarting a Tomcat Web application

Restarting a Tomcat app web application requires the user to have the correct permissions. It is not always feasible to grant access to Tomcat, however, using an Octopus runbook, you don’t have to. Octopus Deploy comes with a built-in step with the capability to restart a Tomcat App. This allows you to provide a self-service method of starting or stopping a Tomcat app without granting any permissions.

Create the runbook

To create a runbook to restart Tomcat:

  1. From your project’s overview page, navigate to Operations ➜ Runbooks, and click ADD RUNBOOK.
  2. Give the runbook a Name and click SAVE.
  3. Click DEFINE YOUR RUNBOOK PROCESS, and then click ADD STEP.
  4. Click Built-in steps, and then select the Start/Stop App in Tomcat step.
  5. Give the step a name.
  6. Fill in the parameters of the step:
Tomcat Manage URLURL of the Tomcat Managerhttp://localhost:8080/manager
Management userName of the management accounttomcat
Management passwordPassword for the management accountMySecretPassword!!!
Context pathThe relative URL to your application/myapp
Deployment versionVersion number of your application1.0.0.1

The last option under Advanced Options is a radio button with two options:

  • Leave the application running (default). Note, This option will start the app if in a stopped state.
  • Stop the application

Help us continuously improve

Please let us know if you have any feedback about this page.

Send feedback

Page updated on Sunday, January 1, 2023