Start or Stop App in Tomcat

Octopus.TomcatState exported 2026-07-22 by Octopus Deploy belongs to ‘JavaAppServer’ category.

Change the state of an application in Tomcat 7+.

Parameters

When this step is included in a project’s deployment process, the parameters below can be set.

Tomcat Manager URL

Tomcat.Deploy.Controller (required)

The URL of the Tomcat Manager instance. This URL is relative to the host that is executing the step.

Default: http://localhost:8080/manager

Example: http://localhost:8080/manager

Management user

Tomcat.Deploy.User (required)

The username to use with the management interface. This user must be assigned to the manager-script group in the tomcat-users.xml file.

Management password

Tomcat.Deploy.Password (required)

The password to use with the management interface.

Context path

Tomcat.Deploy.Name (required)

The context path of the deployed artifact. For example, setting this field to ‘myapp’ will result in the context path /myapp in Tomcat. Set the value to / for the root context.

Example: myapp

Deployment version

Tomcat.Deploy.Version

The Tomcat version used with parallel deployments. Leave blank to leave the Tomcat version undefined.

Application state

Tomcat.Deploy.Enabled

Whether to leave the application running or stop the application.

Allowed values: True, False

Default: True

Step configuration using OCL

Example in Octopus Configuration Language (OCL):

step "start-tomcat-app" {
    name = "Start Tomcat App"
    properties = {
        Octopus.Action.TargetRoles = "tomcat-server"
    }

    action {
        action_type = "Octopus.TomcatState"
        properties = {
            Octopus.Action.RunOnServer = "false"
            Tomcat.Deploy.Controller = "http://localhost:8080/manager"
            Tomcat.Deploy.Enabled = "True"
            Tomcat.Deploy.Name = "myapp"
            Tomcat.Deploy.Password = "#{Tomcat.Manager.Password}"
            Tomcat.Deploy.User = "tomcat-manager"
        }
    }
}

Page updated on Wednesday, July 22, 2026