Downloads of v 8.0.22:


Last Update:

16 May 2015

Package Maintainer(s):

Software Author(s):

  • Apache Software Foundation


application server apache jsf jsp jdk8

Apache Tomcat

This is not the latest version of Apache Tomcat available.

8.0.22 | Updated: 16 May 2015



Downloads of v 8.0.22:


Software Author(s):

  • Apache Software Foundation

Apache Tomcat 8.0.22

This is not the latest version of Apache Tomcat available.

All Checks are Unknown

2 Test of Unknown Status

Validation Testing Unknown

Verification Testing Unknown

To install Apache Tomcat, run the following command from the command line or from PowerShell:


To upgrade Apache Tomcat, run the following command from the command line or from PowerShell:


To uninstall Apache Tomcat, run the following command from the command line or from PowerShell:


NOTE: This applies to both open source and commercial editions of Chocolatey.

1. Ensure you are set for organizational deployment

Please see the organizational deployment guide

  • Open Source or Commercial:
    • Proxy Repository - Create a proxy nuget repository on Nexus, Artifactory Pro, or a proxy Chocolatey repository on ProGet. Point your upstream to Packages cache on first access automatically. Make sure your choco clients are using your proxy repository as a source and NOT the default community repository. See source command for more information.
    • You can also just download the package and push it to a repository Download

3. Enter your internal repository url

(this should look similar to

4. Choose your deployment method:

choco upgrade tomcat -y --source="'STEP 3 URL'" [other options]

See options you can pass to upgrade.

See best practices for scripting.

Add this to a PowerShell script or use a Batch script with tools and in places where you are calling directly to Chocolatey. If you are integrating, keep in mind enhanced exit codes.

If you do use a PowerShell script, use the following to ensure bad exit codes are shown as failures:

choco upgrade tomcat -y --source="'STEP 3 URL'"

Write-Verbose "Exit code was $exitCode"
$validExitCodes = @(0, 1605, 1614, 1641, 3010)
if ($validExitCodes -contains $exitCode) {
  Exit 0

Exit $exitCode

- name: Ensure tomcat installed
    name: tomcat
    state: present
    version: 8.0.22
    source: STEP 3 URL

See docs at

Coming early 2020! Central Managment Reporting available now! More information...

chocolatey_package 'tomcat' do
  action    :install
  version  '8.0.22'
  source   'STEP 3 URL'

See docs at

    Name: tomcat,
    Version: 8.0.22,
    Source: STEP 3 URL

Requires Otter Chocolatey Extension. See docs at

cChocoPackageInstaller tomcat
   Name     = 'tomcat'
   Ensure   = 'Present'
   Version  = '8.0.22'
   Source   = 'STEP 3 URL'

Requires cChoco DSC Resource. See docs at

package { 'tomcat':
  provider => 'chocolatey',
  ensure   => '8.0.22',
  source   => 'STEP 3 URL',

Requires Puppet Chocolatey Provider module. See docs at

salt '*' chocolatey.install tomcat version="8.0.22" source="STEP 3 URL"

See docs at

5. If applicable - Chocolatey configuration/installation

See infrastructure management matrix for Chocolatey configuration elements and examples.

This package was approved by moderator ferventcoder on 03 Jun 2015.


Tomcat is an Application Server. It is possible to run Web application ARchive (WAR) files using Tomcat. Apache Tomcat requires a JDK in order to run.

Optional installation commands:

Issue -packageparameters '"/InstallLocation=C:\Path\to\installationdirectory"' to overwrite the default installation directory, e.g. choco install tomcat -packageparameters '"/InstallLocation=C:\temp"' extracts the package in C:\temp.

Bugs and Features:

Create an issue or comment to an existing one -

$packageName = 'tomcat'
$32BitUrl = ''
$64BitUrl = ''
$global:installLocation = Get-BinRoot
$checksum = 'ffb9fbde8319316353824caca4782c9f'
$checksumType = 'md5'
$checksum64 = '47c7f9cce014043774d8c0ef72715656'
$checksumType64 = 'md5'
$availablePort = '8080'
$serviceName = 'tomcat'

if(!$PSScriptRoot){ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent }
. "$PSScriptRoot\OverwriteParameters.ps1"
. "$PSScriptRoot\Install-Service.ps1"


Install-ChocolateyZipPackage "$packageName" "$32BitUrl" "$global:installLocation" "$64BitUrl" -checksum "$checksum" -checksumType "$checksumType" -checksum64 "$checksum64" -checksumType64 "$checksumType64"

$catalinaHome = "$global:installLocation\apache-tomcat-8.0.22"
$createServiceCommand = "${catalinaHome}\bin\service.bat install $packageName"

Install-ChocolateyEnvironmentVariable 'CATALINA_HOME' "$catalinaHome"

Install-Service $packageName $serviceName $createServiceCommand $availablePort
$packageName = 'tomcat'

if(!$PSScriptRoot){ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent }
. "$PSScriptRoot\Install-Service.ps1"
. "$PSScriptRoot\Uninstall-ZipPackage.ps1"

Uninstall-Service "$packageName"

Uninstall-ZipPackage "$packageName"
function Install-Service {
    Installs a service

    This will install a service

    .PARAMETER PackageName
    The name of the package for whom the service will be installed.

    .PARAMETER ServiceName
    The name of service which will be used to install and start the service.

    .PARAMETER CreateServiceCommand
    The command which installs the service.

    .PARAMETER AvailablePort (OPTIONAL)
        The port which needs to be available in order to start the service.

        Install-Service "dcm4chee" "DCM4CHEE" "nssm install DCM4CHEE `"java`" -jar `"%DCM4CHEE_HOME%/bin/run.jar"`" "8090"
        Install-Service "postgresqlzip" "PostgreSQL" "pg_ctl register -N `"PostgreSQL`" -U `"LocalSystem`" -w" "5432"
        Install-Service "apacheds" "ApacheDS" "nssm install ApacheDS `"java`" -jar `"%APACHEDS_HOME%/lib/apacheds-service-${version}.jar`" `"%APACHEDS_HOME%/instances/default`"" "10389"
        Install-Service "test" "test" "nssm install test `"$testDirectory\testService.bat`""


        This helper reduces the number of lines one would have to write to install a service to 1 line.
        This method has error handling built into it.

            [string] $packageName,
            [string] $serviceName,
            [string] $createServiceCommand,
            [int] $availablePort
        Write-debug "Running 'Install-Service' for $packageName with serviceName:`'$serviceName`', createServiceCommand: `'$createServiceCommand`', availablePort: `'$availablePort`' ";

    if (!$packageName) {
        Write-ChocolateyFailure "Install-Service" "Missing PackageName input parameter."

    if (!$serviceName) {
        Write-ChocolateyFailure "Install-Service" "Missing ServiceName input parameter."

    if (!$createServiceCommand) {
        Write-ChocolateyFailure "Install-Service" "Missing CreateServiceCommand input parameter."

        UnInstall-Service -serviceName "$serviceName"

    if ($availablePort -and (Get-StatePort)) {
        Write-ChocolateyFailure "Install-Service" "$availablePort is in LISTENING state and not available."

    try {
        Write-Host "$packageName service will be installed"
        iex $createServiceCommand
    } catch {
    Write-ChocolateyFailure "Install-Service" "The createServiceCommand is incorrect: '$_'."

if (Get-ServiceExistence) {
        Write-Host "$packageName service will be started"

        for ($i=0;$i -lt 12; $i++) {
            $serviceStatus = Get-Service -Name $serviceName

                             start-service $serviceName

            if (($serviceStatus.Status -eq "running") -and (Get-StatePort)) {
                Write-Host "$packageName service has been started"
            } else {
                Write-Host "$packageName service cannot be started. Attempt $i to start the service."

            if ($i -eq 11) {
                Write-ChocolateyFailure "Install-Service" "service $serviceName cannot be started."

                Start-Sleep -s 10
    } else {
        Write-ChocolateyFailure "Install-Service" "service $serviceName does not exist."

function Get-ServiceExistence {
        [string] $serviceName = $serviceName
    Get-WmiObject -Class Win32_Service -Filter "Name='$serviceName'"

function Uninstall-Service {
        [string] $serviceName = $serviceName
    $service = Get-ServiceExistence -serviceName $serviceName

    if ($service) {
        Write-Host "$serviceName service already exists and will be removed"
        stop-service $serviceName

function Get-StatePort {
    return Get-NetTCPConnection -State Listen | Where-Object {$_.LocalAddress -match "::|(127|0).0.0.(0|1)" -and $_.LocalPort -eq "$availablePort"}
function OverwriteParameters {
	$arguments = @{};
	$packageParameters = $env:chocolateyPackageParameters;

	if($packageParameters) {
		Write-Host "PackageParameters: $packageParameters"
		$MATCH_PATTERN = "/([a-zA-Z]+)=(.*)"
		if($packageParameters -match $MATCH_PATTERN){
			$results = $packageParameters | Select-String $MATCH_PATTERN -AllMatches 
			$results.matches | % { 
		} else {
			Write-Host "Default packageParameters will be used"
		if($arguments.ContainsKey("InstallLocation")) {
			$global:installLocation = $arguments["InstallLocation"];
			Write-Host "Value variable installLocation changed to $global:installLocation"
		} else {
			Write-Host "Default InstallLocation will be used"
	} else {
		Write-Host "Package parameters will not be overwritten"
function Uninstall-ZipPackage {
  [string] $packageName
	if(!$packageName) {
		Write-ChocolateyFailure "Uninstall-ZipPackage" "Missing PackageName input parameter."
	ChildItem "$env:ChocolateyInstall\lib\${packageName}" -Recurse -Filter "${packageName}" | 
	ForEach-Object{ $installLocation = (Get-Content $_.FullName | Select-Object -First 1);
		if (("$installLocation" -match "${packageName}|apache-tomcat") -and (Test-Path -Path "$installLocation")) {
			Write-Host "Uninstalling by removing directory $installLocation";
			Remove-Item -Recurse -Force "$installLocation"
		} else {
			Write-ChocolateyFailure "Uninstall-ZipPackage" "Unable to delete directory: $installLocation"

Log in or click on link to see number of positives.

In cases where actual malware is found, the packages are subject to removal. Software sometimes has false positives. Moderators do not necessarily validate the safety of the underlying software, only that a package retrieves software from the official distribution point and/or validate embedded software against official distribution point (where distribution rights allow redistribution).

Chocolatey Pro provides runtime protection from possible malware.

Version Downloads Last Updated Status
Apache Tomcat 9.0.38 1724 Wednesday, September 30, 2020 Approved
Apache Tomcat 9.0.37 1348 Friday, July 31, 2020 Approved
Apache Tomcat 9.0.36 1075 Thursday, June 18, 2020 Approved
Apache Tomcat 9.0.34 1407 Wednesday, April 22, 2020 Approved
Apache Tomcat 9.0.30 2476 Friday, December 13, 2019 Approved
Apache Tomcat 9.0.29 671 Friday, November 22, 2019 Approved
Apache Tomcat 9.0.27 923 Saturday, October 12, 2019 Approved
Apache Tomcat 9.0.26 537 Friday, September 20, 2019 Approved
Apache Tomcat 9.0.24 1017 Sunday, August 18, 2019 Approved
Discussion for the Apache Tomcat Package

Ground Rules:

  • This discussion is only about Apache Tomcat and the Apache Tomcat package. If you have feedback for Chocolatey, please contact the Google Group.
  • This discussion will carry over multiple versions. If you have a comment about a particular version, please note that in your comments.
  • The maintainers of this Chocolatey Package will be notified about new comments that are posted to this Disqus thread, however, it is NOT a guarantee that you will get a response. If you do not hear back from the maintainers after posting a message below, please follow up by using the link on the left side of this page or follow this link to contact maintainers. If you still hear nothing back, please follow the package triage process.
  • Tell us what you love about the package or Apache Tomcat, or tell us what needs improvement.
  • Share your experiences with the package, or extra configuration or gotchas that you've found.
  • If you use a url, the comment will be flagged for moderation until you've been whitelisted. Disqus moderated comments are approved on a weekly schedule if not sooner. It could take between 1-5 days for your comment to show up.
comments powered by Disqus