Tomcat

19 minute readExtensibilityDeveloper productivity

The EC-Tomcat plugin allows users to interact with the Tomcat server and perform tasks such as Server Administration (Start/Shutdown of a Server), Application Deployment (Deploy or Undeploy), Resource Management (Adding or Removing JMS Resources or Data Sources) etc. Apache Tomcat, also referred to as Jakarta Tomcat or Tomcat, is an open source servlet container developed by the Apache Software Foundation (ASF). Tomcat implements the Java Servlet and the JavaServer Pages (JSP) specifications from the Oracle Corporation. It also provides a pure Java HTTP web server environment for Java code to run.

For more information about Apache Tomcat, go to the Apache Tomcat site.

Plugin version 2.3.6

Revised on September 21, 2020

EC-Tomcat operations mode

Plugin supports two different approaches for interacting with Tomcat that pertain to Application Deployment and Application Management. Refer to the configuration section to determine any special setup required for each kind of interaction.

Performing a variety of operations without calling any HTTP endpoints and instead using the metadata provided in the application’s context XML file in the file system. Following procedures use this approach :

  • DeployApplication

  • UndeployApplication

  • AddDatasource

  • RemoveDataSource

  • CreateOrUpdateJMSConnectionFactory

  • CreateOrUpdateJMSQueue

  • CreateOrUpdateJMSTopic

  • CreateOrUpdateMailSession

  • DeleteResource

Performing a variety of operations that use the Tomcat Manager. Following procedures use this approach:

  • DeployApp

  • UndeployApp

  • StartApp

  • StopApp

  • ReloadApp

  • RunTomcatManager

Supported Versions

All procedures have been tested with the following versions of Tomcat:

  • 6.0.35

  • 7.0.69

  • 8.0.33

In addition, all new procedures introduced since 2.2.0 have been tested on these versions of Tomcat:

  • 8.5.32

  • 9.0.10

Plugin Configurations

After you perform the setup below it is important to make sure that the CloudBees CD agent machine on which Tomcat runs is registered as a resource that can be pinged.

Plugin configurations are sets of parameters that apply across some or all of the plugin procedures. They reduce repetition of common values, create predefined parameter sets for end users, and securely store credentials where needed. Each configuration is given a unique name that is entered in designated parameters on procedures that use them.

Creating Plugin Configurations

To create plugin configurations in CloudBees CD, do these steps:

  • Go to Administration Plugins to open the Plugin Manager.

  • Find the EC-Tomcat-2.3.6 row.

  • Click Configure to open the Configurations page.

  • Click Create Configuration as per the description of parameters below.

Configuration Procedure Parameters

ParameterDescription

Configuration Name

Name of the configuration to be used for retrieving Admin Server’s URL and credentials.

Tomcat Home

Absolute path to Tomcat Installation Home (aka Catalina Home) directory.

Tomcat URL

URL of Tomcat Server (must include protocol, server and port). It is used to check Tomcat server status and in addition for sending messages to Tomcat Manager.

Examples: http://tomcat.example.com:8080 , https://tomcat.example.com:8443

Tomcat Manager credentials

User name and Password used by CloudBees CD to communicate with Tomcat Deployment Manager. This is required only if procedures using Tomcat Manager are used.

The Tomcat Configurations page now shows the new configuration.

Plugin Procedures

IMPORTANT: For all parameter descriptions in this section, required parameters are shown in bold italics.

Warning About .war file Location For all procedures where a .war file path is required, the .war file must be accessible by Tomcat locally or on a network share.

StartServer

Starts a Tomcat Server

StartServer Parameters

ParameterDescription

Configuration Name

Name of the configuration to be used for retrieving Admin Server’s URL and credentials.

Catalina Path

Provide the absolute path to Catalina’s home to locate the catalina.bat (or catalina.sh) needed to start or stop the application servers. i.e: 'C:\Program Files\tomcat'.

Startup Script Path

Provide the absolute path to the startup server script. Include filename and extension. i.e: 'C:\Program Files\tomcat\bin\startup.bat'.

After the job runs, you can view the results, including job details, which show the server started.

In the StartServer step, click the Log icon to see the diagnostic information.

ShutdownServer

Shutdown a Tomcat Server

ShutdownServer Parameters

ParameterDescription

Catalina Path

Provide the absolute path to Catalina’s home to locate the catalina.bat (or catalina.sh) needed to start or stop the application servers. i.e: 'C:\Program Files\tomcat'. (Required)

Shutdown Script Path

Provide the absolute path to the shutdown server script. Include filename and extension. i.e: 'C:\Program Files\tomcat\bin\shutdown.bat'. (Required)

After the job runs, you can view the results, including job details, which show the server stopped.

In the ShutdownServer step, click the Log icon to see the diagnostic information.

StartTomcatService

Start a Tomcat Service (Windows only)

StartTomcatService Parameters

ParameterDescription

Service Name

Provide the name of the Tomcat service to start. (Required)

After the job runs, you can view the results, including the following job details, which show the service started:

In the StartTomcatService step, click the Log icon to see the diagnostic information. The output is similar to the following diagnostic report:

StopTomcatService

Stop a Tomcat Service (Windows only)

StopTomcatService Parameters

ParameterDescription

Service Name

Provide the name of the Tomcat service to stop. (Required)

After the job runs, you can view the results, including the following job details, which show the service stopped:

In the StopTomcatService step, click the Log icon to see the diagnostic information. The output is similar to the following diagnostic report:

DeployApp

( Requires Tomcat Manager setup )

Deploy an application into a Tomcat Server

This procedure uses Tomcat Manager application
The DeployApp procedure deploys application to the specified servers. You can run this procedure in more than one Tomcat environment by specifying the configurations to which this procedure applies.

DeployApp Parameters

ParameterDescription

Context Configuration Path

Provide the context configuration file path.

Context Path

Context Path to use. In one sentence, the context path is the name after slash, by which your application is accessible.

Configuration Name

Name of the configuration to be used for retrieving Admin Server’s URL and credentials.

Update Application

Check this checkbox if the existing application in the supplied context path must be overridden.

WAR File/Exploded Directory Path

Provide the path to the WAR file or exploded directory to upload to the server. If this parameter is sent empty, the plugin will look into the appBase directory of Tomcat for the .war file that match with th Context Path provided to make the deploy. Acceptable formats: file - use the prefix file: and the absolute path of the WAR file or directory. i.e: 'file:/absolute/path/to/a/directory' or 'file:c:/mydir/webapp.war' --- jar - use the prefix jar:. The URL to a local WAR file. You can use any syntax that is valid for the JarURLConnection class for reference to an entire JAR file. --- no prefix - if no prefix is entered, the Tomcat Manager will look in the host’s application base directory for either a WAR file or a directory, relative to the mentioned path. --- no prefix and remote deploy - if no prefix is entered and 'Remote Deployment' is checked, the Tomcat Manager will look into the war path entered for the WAR file.

After the job runs, you can view the results, including the following job details, which show the application was deployed:

In the DeployApp step, click the Log icon to see the diagnostic information. The output is similar to the following diagnostic report:

UndeployApp

( Requires Tomcat Manager setup )

Undeploy an application into a Tomcat Server

This procedure uses Tomcat Manager application
The UndeployApp procedure undeploys applications on the server. You can run this procedure in more than one Tomcat environment by specifying the configurations to which this procedure applies.

UndeployApp Parameters

ParameterDescription

Context Path

Context Path to use. In one sentence, the context path is the name after slash, by which your application is accessible.

Configuration Name

Name of the configuration to be used for retrieving Admin Server’s URL and credentials.

After the job runs, you can view the results, including the following job details, which show the application was undeployed:

In the UndeployApp step, click the Log icon to see the diagnostic information. The output is similar to the following diagnostic report:

DeployApplication

( Uses Context XML files, Tomcat Manager setup not required )

Deploy an application into a Tomcat Server ( using Context files )

The DeployApplication procedure deploys application to the specified server using file operations. It will copy WAR files to corresponding appBase folder and write down given Context XML to specified Host’s folder Procedure supports virtual hosts and unusual configurations ( e.g. multiple virtual hosts with same appBase folder )

DeployApplication Parameters

ParameterDescription

Configuration Name

Name of the configuration to be used for retrieving Tomcat Home.

Application Warfile Location

Name of the War file which consists of the Web Application to be deployed, with absolute path.

For example /var/downloads/hello.war

Request URL Context Path

The Context path of the URL at which Tomcat serves the application.

For example, if tomcat should serve the Application at http://host:port/ws this value should be /ws and if tomcat should serve the Application at http://host:port /abc/ws , this value should be /abc/ws

VirtualHost Name

Hostname of the Tomcat Server or the virtual host to which the application should be deployed. If this field is left empty, application will be deployed to Tomcat default host (localhost). Warning will be shown if provided name is not defined in conf/server.xml

Host Application Directory location

This is the pathname of a directory where web applications for this host are located (Tomcat calls it appBase folder). If this field is left empty, it will be read from corresponding Host (specified by HostName) appBase attribute in conf/server.xml . Warning will be thrown if directory doesn’t exist. Also procedure will fail if can’t retrieve value either from input or conf/server.xml

Web Application Context Element

The full XML content for the <Context> element of the Context Descriptor. (You can read more about possible attributes in Tomcat documentation ). If no value is provided, default value will be formed dynamically according to values given for Application Warfile Location and Request URL Context Path. <?xml version="1.0" encoding="UTF-8"?> <Context docBase="hello.war" path="/hello" unpackWAR="true"> </Context> Here docBase is path where deployed application warfile lives - /path/to/hello.war (relative to Host’s appBase) and path is the same as "Request URL Context Path" /hello

Update Action

Controls if tomcat should override and deploy over an existing deployment.

No Action - If the war already exists do not copy over. Remove and recreate - If the war exists, copy over and redeploy.

Server Restart Options

Controls if Server should be restarted or not. Values are:

* Restart Unconditionally If this option is chosen, Server is restarted regardless of whether the previous steps are successful or not. Also if the there is a deployment failure after the Restart no action is taken.

* Do not Restart If this option is chosen, Server will not be restarted. This is a use case where in Server Restarts happen as part of a deferred schedule or Host "autoDeploy" attribute is set to true.

* Stop Restarted Server upon failure. If this option is chosen, server will be restarted except that it will be stopped if the deployment fails.

UndeployApplication

(Uses Context XML files, Tomcat Manager setup not required.)

Undeploy an application from a Tomcat Server (removing deployment files and Context file).

The UndeployApplication procedure removes files that corresponds to deployment. Procedure supports virtual hosts and unusual configurations ( e.g. multiple virtual hosts with same appBase folder )

UndeployApplication Parameters

ParameterDescription

Configuration Name

Name of the configuration to be used for retrieving Tomcat Home.

Request URL Context Path

The Context path of the URL at which Tomcat serves the application. For example, if tomcat should serve the Application at http://host:port/ws this value should be /ws and if tomcat should serve the Application at http://host:port /abc/ws , this value should be /abc/ws

Host Application Directory location

This is the pathname of a directory where web applications for this host are located (Tomcat calls it appBase folder). If this field is left empty, it will be read from corresponding Host (specified by HostName) appBase attribute in conf/server.xml . Warning will be thrown if directory doesn’t exist. Also procedure will fail if can’t retrieve value either from input or conf/server.xml

VirtualHost Name

Hostname of the Tomcat Server or the virtual host to which the application should be deployed. If this field is left empty, application will be deployed to Tomcat default host (localhost). Warning will be shown if provided name is not defined in conf/server.xml

Specific Deployment Files

If specified procedure will remove context XML file with given Request URL Context Path and any given filepathes. If empty, procedure will read docBase attribute from context XML with given Request URL Context Path , then if this is .war file will check for extracted folder and remove both.

Server Restart Options

Controls if Server should be restarted or not. Values are:

* Restart Unconditionally If this option is chosen, Server is restarted regardless of whether the previous steps are successful or not. Also if the there is a deployment failure after the Restart no action is taken.

* Do not Restart If this option is chosen, Server will not be restarted. This is a use case where in Server Restarts happen as part of a deferred schedule or Host "autoDeploy" attribute is set to true.

* Stop Restarted Server upon failure. If this option is chosen, server will be restarted except that it will be stopped if the deployment fails.

AddDatasource

Adds a Datasource resource declaration into the Tomcat Context

AddDatasource Parameters

ParameterDescription

Context Configuration Path

Absolute path of "context.xml", including filename and extension. i.e: '$CATALINA_BASE/conf/context.xml' or 'C:\apache-tomcat-6.0.35\conf\context.xml'.

Datasource Name

The name of the datasource. i.e: 'jdbc/MyTest'.

URL

Connection URL to be passed to our JDBC driver. i.e: 'jdbc:mysql://hostname:3306/databaseName'.

Max Active Connections

The maximum number of connections that can be allocated from this pool at the same time. Default is 8.

Max Idle Connections

The maximum number of connections that can sit idle in this pool at the same time. Default is 8.

Maximum Wait for Connections

The maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception. Default is -1 (infinite).

Minimum Wait for Connections

The minimum number of connections that will sit idle in this pool at the same time.

Additional Attributes

Enter additional attributes for the resource. Use this format: 'attributeName="value";attributeName2="value2"' where ';' is used to separate the attributes. Note the "" around the values.

Driver Class Name

Fully qualified Java class name of the JDBC driver to be used. i.e: 'com.mysql.jdbc.Driver'.

Datasource credential

Specify credential that contains username and password for data source.

After the job runs, you can view the results, including the following job details, which show the datasource resource declaration was added to the Tomcat context:

In the AddDatasource step, click the Log icon to see the diagnostic information. The output is similar to the following diagnostic report:

RemoveDatasource

Removes a Datasource resource declaration from the Tomcat Context

RemoveDatasource Parameters

ParameterDescription

Context Configuration Path

Absolute path of "context.xml", including filename and extension. i.e: '$CATALINA_BASE/conf/context.xml' or 'C:\apache-tomcat-6.0.35\conf\context.xml'.

Datasource Name

The name of the datasource. i.e: 'jdbc/MyTest'.

After the job runs, you can view the results, including the following job details, which show the datasource resource declaration was removed from the Tomcat context:

In the RemoveDatasource step, click the Log icon to see the diagnostic information. The output is similar to the following diagnostic report:

CreateOrUpdateJMSConnectionFactory

Adds a new JMS Connection Factory or updates an existing Connection Factory based on the update action (refer to procedure parameter descriptions below), with support for different JMS providers.

CreateOrUpdateJMSConnectionFactory Parameters

ParameterDescription

Config Name

Unique name for the configuration for the Tomcat server

VirtualHost Name

Hostname of the Tomcat Server or the virtual host where application is deployed

Request URL Context Path

The Context path of the URL at which Tomcat serves the application.

JNDI Name

Name used to look up the resource in JNDI

Provider

Select provider for the JMS resources

ActiveMQ Broker URL

The URI is assumed to be a composite uri with multiple uris that are used to bind the connectors of the broker. Parameter is required if selected provider 'Apache ActiveMQ'.

ActiveMQ Broker Name

Broker Name. Parameter is required when 'Provider' is 'Apache ActiveMQ'.

WebsphereMQ Connection Factory Type

Type of resource that is controlled by WebsphereMQ connection factory. Parameter is required when 'Provider' is 'IBM WebSphereMQ'.

WebsphereMQ Server Hostname

Network hostname where Websphere MQ provider is located. Parameter is required when 'Provider' is 'IBM WebSphereMQ'.

WebsphereMQ Server Port

TCP Port (1 - 65535) on server where Websphere MQ provider is located. Parameter is required when 'Provider' is 'IBM WebSphereMQ'.

WebsphereMQ Channel

Name for a channel on WebsphereMQ. Parameter is required when 'Provider' is 'IBM WebSphereMQ'.

WebsphereMQ Queue Manager

Name of a queue manager on WebsphereMQ. Parameter is required when 'Provider' is 'IBM WebSphereMQ'.

Custom Connection Factory Class

Fully qualified name of the Java class to use. i.e: 'org.apache.activemq.ActiveMQConnectionFactory'. Parameter is required when 'Provider' is 'Custom'.

Custom Connection Factory Factory Class

Fully qualified name of the Factory Java class to use. i.e: 'org.apache.activemq.JNDIRefferenceFactory'. Parameter is required when 'Provider' is 'Custom'

Custom Connection Factory Attributes

Enter additional attributes for the resource. Use this format: 'attributeName="value";attributeName2="value2"' where ';' is used to separate the attributes. Note the "" around the values.

Description

Description for this Connection factory

Update Action

This parameter controls as to what the Update Action should be done when resource element with the same JNDI name exists.

When using CloudBees CD Platform interface, you should insert values only for your JMS provider (and all parameters for provider are mandatory)

Here are examples for each "Provider" case:

Vendor is 'Apache ActiveMQ'

Vendor is 'WebsphereMQ'

Vendor is 'Custom'

In CloudBees CD interface parameters that are not regarding to the selected "Vendor" are hidden

CreateOrUpdateJMSQueue

Adds a new JMS Queue or updates an existing JMS Queue based on the update action (refer to procedure parameter descriptions below), with support for different JMS providers.

CreateOrUpdateJMSQueue Parameters

ParameterDescription

Config Name

Unique name for the configuration for the Tomcat server

VirtualHost Name

Hostname of the Tomcat Server or the virtual host where application is deployed

Request URL Context Path

The Context path of the URL at which Tomcat serves the application.

JNDI Name

Name used to look up the resource in JNDI

Provider

Select provider for the JMS resources

Custom JMS Queue Class

Fully qualified name of the Java class to use. i.e: 'org.apache.activemq.ActiveMQQueue'.

Custom JMS Queue Factory Class

Fully qualified name of the Factory Java class to use. i.e: 'org.apache.activemq.ActiveMQConnectionFactory'.

Custom JMS Queue Attributes

Enter additional attributes for the resource. Use this format: 'attributeName="value";attributeName2="value2"' where ';' is used to separate the attributes. Note the "" around the values.

Description

Description for this JMS Queue

Update Action

This parameter controls as to what the Update Action should be done when resource element with the same JNDI name exists.

CreateOrUpdateJMSTopic

Adds a new JMS Topic or updates an existing JMS Topic based on the update action (refer to procedure parameter descriptions below), with support for different JMS providers.

CreateOrUpdateJMSTopic Parameters

ParameterDescription

Config Name

Unique name for the configuration for the Tomcat server

VirtualHost Name

Hostname of the Tomcat Server or the virtual host where application is deployed

Request URL Context Path

The Context path of the URL at which Tomcat serves the application.

JNDI Name

Name used to look up the resource in JNDI

Provider

Select provider for the JMS Resources

Custom JMS Topic Class

Fully qualified name of the Java class to use. i.e: 'org.apache.activemq.ActiveMQTopic'.

Custom JMS Topic Factory Class

Fully qualified name of the Factory Java class to use. i.e: 'org.apache.activemq.JNDIReferenceFactory'.

Custom JMS Topic Attributes

Enter additional attributes for the resource. Use this format: 'attributeName="value";attributeName2="value2"' where ';' is used to separate the attributes. Note the "" around the values.

Description

Description for this JMS Topic

Update Action

This parameter controls as to what the Update Action should be done when resource element with the same JNDI name exists.

CreateOrUpdateMailSession

Adds a new JMS Mail Session or updates an existing Mail Session based on the update action (refer to procedure parameter descriptions below).

CreateOrUpdateMailSession Parameters

ParameterDescription

Config Name

Unique name for the configuration for the Tomcat server

VirtualHost Name

Hostname of the Tomcat Server or the virtual host where application is deployed

Request URL Context Path

The Context path of the URL at which Tomcat serves the application.

JNDI Name

The JNDI name for this Mail session (should be unique for context)

SMTP Host

The server that provides SMTP service for your network

Description

Description for this Mail session resource element

Update Action

This parameter controls as to what the Update Action should be done when resource element with the same JNDI name exists.

DeleteResource

Removes any of these resources - Connection Factory, JMS Queue, JMS Topic and Mail Session

DeleteResource Parameters

ParameterDescription

Config Name

Unique name for the configuration for the Tomcat server.

VirtualHost Name

Hostname of the Tomcat Server or the virtual host where application is deployed.

Request URL Context Path

The Context path of the URL at which Tomcat serves the application.

JNDI Name

JNDI name of the Resource delete.

ReloadApp

( Requires Tomcat Manager setup )

Reload an application of a Tomcat Server

This procedure uses Tomcat Manager application
The ReloadApp procedure sends a signal to an existing application to shut down and reload. You can run this procedure in more than one Tomcat environment by specifying the configurations to which this procedure applies.

ReloadApp Parameters

ParameterDescription

Context Path

Context Path to use. In one sentence, the context path is the name after slash, by which your application is accessible.

Configuration Name

Name of the configuration to be used for retrieving Admin Server’s URL and credentials.

After the job runs, you can view the results, including the following job details, which show the application was reloaded:

In the ReloadApp step, click the Log icon to see the diagnostic information. The output is similar to the following diagnostic report:

StartApp

( Requires Tomcat Manager setup )

Start an application into a Tomcat Server

This procedure uses Tomcat Manager application
The StartApp procedure starts applications on the server. You can run this procedure in more than one Tomcat environment by specifying the configurations to which this procedure applies.

StartApp Parameters

ParameterDescription

Context Path

Context Path to use. In one sentence, the context path is the name after slash, by which your application is accessible.

Configuration Name

Name of the configuration to be used for retrieving Admin Server’s URL and credentials.

After the job runs, you can view the results, including the following job details, which show the application started:

In the StartApp step, click the Log icon to see the diagnostic information. The output is similar to the following diagnostic report:

StopApp

( Requires Tomcat Manager setup )

Stop an application into a Tomcat Server

This procedure uses Tomcat Manager application
The StopApp procedure stops applications on the server. You can run this procedure in more than one Tomcat environment by specifying the configurations to which this procedure applies.

StopApp Parameters

ParameterDescription

Context Path

Context Path to use. In one sentence, the context path is the name after slash, by which your application is accessible.

Configuration Name

Name of the configuration to be used for retrieving Admin Server’s URL and credentials.

After the job runs, you can view the results, including the following job details, which show the application stopped:

In the StopApp step, click the Log icon to see the diagnostic information. The output is similar to the following diagnostic report:

CheckServerStatus

Check the status of the given server URL

CheckServerStatus Parameters

ParameterDescription

Configuration Name

Name of the configuration to be used for retrieving Admin Server’s URL and credentials.

Maximum Elapsed Time

Defines the maximum time in seconds that the job will try to check into the server. Blank implies no wait time (URL only checked one time).

Success Criteria

Indicate the status of the page that must be matched, either a Page found or a Page not found status. If the indicated success criteria matches the returned status at the end of the analysis, it is considered a success. Otherwise, it is an error in the job.

After the job runs, you can view the results, including the following job details, which show the status of the server:

In the CheckServerStatus step, click the Log icon to see the diagnostic information. The output is similar to the following diagnostic report:

CheckPageStatus

Check the status of a page on a given URL

CheckPageStatus Parameters

ParameterDescription

Credentials

Credentials to be entered.

Maximum Elapsed Time

Defines the maximum time in seconds that the job will try to check into the server (max of 180 seconds). Blank implies no wait time (0 seconds).

Success Criteria

Indicate the status of the page that must be matched, either a Page found or a Page not found status. If the indicated success criteria matches the returned status at the end of the analysis, it is considered a success. Otherwise, it is an error in the job. (Required)

Page URL

URL of the page to be checked. i.e: 'http://localhost/examples/jsp/index.html'. (Required)

After the job runs, you can view the results, including the following job details, which show the status of the page:

In the CheckPageStatus step, click the Log icon to see the diagnostic information. The output is similar to the following diagnostic report:

RunTomcatManager

Run Tomcat Manager in a free-mode

This procedure uses Tomcat Manager application
The RunTomcatManager procedure runs a command using the Tomcat Manager. The Tomcat Manager can also install, start, stop, remove, and report on Web applications.

RunTomcatManager Parameters

ParameterDescription

Command

Provide the command to pass to the Tomcat Manager. i.e: 'start', 'stop', 'run'.

Configuration Name

Name of the configuration to be used for retrieving Admin Server’s URL and credentials.

Parameters

Provide additional parameters received by Tomcat Manager. Enter as URL parameters. i.e: 'path=/Calendario&war=file:C:\Calendar.war'.

DeployLibraryFile

Deploys a specified library file to an appropriate destination in the Tomcat Server.

DeployLibraryFile Parameters

ParameterDescription

Config Name

Unique name for the configuration for the Tomcat server.

Destination Filepath

Absolute path where deployed library file should appear after procedure run.

Local Filepath

Absolute path to a local file that should be deployed.

Overwrite

Controls action that should be made if "Destination Filepath" already exists.

DeployConfigurationFile

Deploys a specified configuration file to an appropriate destination in the Tomcat Server.

DeployConfigurationFile Parameters

ParameterDescription

Config Name

Unique name for the configuration for the Tomcat server.

Destination Filepath

Absolute path where configuration XML file should be copied to.

Local Filepath

Absolute path to where the configuration XML file is copied from.

Configuration File Content

XML content for config file that should be deployed (ignored if "Local Filepath" is given).

Overwrite

Controls action to be taken if file already exists in the destination.

UndeployFile

Removes a specified library or configuration file from the tomcat server.

UndeployFile Parameters

ParameterDescription

Config Name

Unique name for the configuration for the Tomcat server.

Destination Filepath

Absolute path to the library file that should be deleted.

Use Cases

Deploying Applications with RunTomcatManager

This example shows how to deploy an application using the Tomcat Manager and the deploy command.

To deploy the application: - Go to the RunTomcatManager procedure. - Enter the following parameters:

After the job runs, you can view the results, including the following job details, which show the application was deployed:

In the RunTomcatManager step, click the Log icon to see the diagnostic information. The output is similar to the following diagnostic report:

Undeploy Applications with RunTomcatManager

This example shows how to undeploy the application that was deployed in the previous example using the Tomcat Manager and undeploy command.

To undeploy the application: - Go to the RunTomcatManager procedure. - Enter the following parameters:

After the job runs, you can view the results, including the following job details, which show that the application was undeployed:

In the RunTomcatManager step, click the Log icon to see the diagnostic information. The output is similar to the following diagnostic report:

Release notes

EC-Tomcat 2.3.6

  • The documentation has been migrated to the main documentation site.

EC-Tomcat 2.3.5

  • Renaming to "CloudBees CD".

EC-Tomcat 2.3.4

  • Renaming to "CloudBees"

EC-Tomcat 2.3.3

  • The plugin documentation has been updated.

EC-Tomcat 2.3.2

  • Configurations can be created by users with "@" sign in a name.

EC-Tomcat 2.3.1

  • Added metadata that is required for 9.0 release.

  • Updated plugin icon.

EC-Tomcat 2.3.0

  • Following New procedures added to support JMS and Mail Session Resource Management:

    • CreateOrUpdateJMSConnectionFactory

    • CreateOrUpdateJMSQueue

    • CreateOrUpdateJMSTopic

    • CreateOrUpdateMailSession

    • DeleteResource

  • Following New procedures added to support configuration and library file deployments:

    • DeployLibraryFile

    • DeployConfigurationFile

    • UndeployFile

  • Tomcat Home parameter was added to the plugin configuration (it is used in new procedures).

EC-Tomcat 2.2.0

  • New Procedures have been added to support Tomcat Static Deployment, where in Deployment or Undeployment can be done through file operations with Context XML Files and not using the Tomcat Deployment Manager. These procedures can be used in a pipeline to deploy an Application to multiple virtual environments.

EC-Tomcat 2.1.3

  • Configured the plugin to allow the ElectricFlow UI to create configs inline of procedure form.

EC-Tomcat 2.1.2

  • Configured the plugin to allow the ElectricFlow UI to render the plugin procedure parameters entirely using the configured form XMLs.

  • Enabled the plugin for managing the plugin configurations in-line when defining an application process step or a pipeline stage task.

EC-Tomcat 2.1.1

  • Fixed issue with configurations being cached for IE.

  • Support for Tomcat versions bigger than 6.

EC-Tomcat 2.1.0

  • Replaced Username and Password fields with credential in AddDatasource procedure (backward incompatible change).

  • Renamed ElectricCommander to ElectricFlow.

  • Added link to plugin Configuration Page in plugin step panels.

EC-Tomcat 2.0.9

  • Removed the XML::DOM dependency.

  • Changed the minimum required Flow version to Flow 4.2.

EC-Tomcat 2.0.8

  • Fixed minor bugs.

EC-Tomcat 2.0.7

  • Added new procedures to add and remove datasources.

  • Fixed minor bugs.

EC-Tomcat 2.0.6

  • Changed procedure names in the step picker section.

EC-Tomcat 2.0.5

  • Added the functionality to deploy .war files remotely.

  • Added the functionality to deploy, undeploy, start, stop, and reload applications on more than one Tomcat environment.

EC-Tomcat 2.0.4

  • Added the Configuration Name parameter to the StartServer.

EC-Tomcat 2.0.3

  • Improved to the Help document.

EC-Tomcat 2.0.2

  • Upgraded the plugin to use the new XML parameter form.

  • Added a link directly to the new Help document.

EC-Tomcat 2.0.1

  • Improved the XML parameter panels.

  • Formatted the new Help page.

EC-Tomcat 1.2.1

  • Added a security check in the StartServer procedure to ensure that key files exist.

EC-Tomcat 1.2.0

  • Fixed a UI bug in the Configuration page list.

  • Added the CheckPageStatus procedure.

  • Removed the curl dependency in the DeployApp, StopApp, StartApp, UndeployApp, RunManager, and ReloadApp procedures.

EC-Tomcat 1.0.2

  • Removed the curl dependency in the CheckServerStatus procedure.

EC-Tomcat 1.0.1

  • A trailing slash is appended to URL on procedures if needed.

  • The application context file path in the DeployApp procedure is not required.

  • The ShutdownServer procedure receives Catalina home as a parameter.