Notices: This section not yet converted to new layout. Download stats are rolling back out.

This is a prerelease version of Apache Tomcat.

Apache Tomcat

9.0.0-rc

Package test results are pending

There are versions of this package awaiting moderation . See the Version History section below.

This package is exempt from moderation. While it is likely safe for you, there is more risk involved.

Tomcat is a 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:

choco install tomcat -params "servicename=*servicename*" to specify a custom name for the Tomcat Windows service. This defaults to Tomcat8.

choco install tomcat -params "unzipLocation=*path*" to specify the root directory for the Tomcat service. This defaults to C:\Program Files\Apache Software Foundation\Tomcat.
Note: An apache-tomcat-9.0.0 folder is always created, so the actual install path is C:\Program Files\Apache Software Foundation\Tomcat\apache-tomcat-9.0.0 for the default case or path\apache-tomcat-9.0.0 with a custom option.

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

C:\> choco install tomcat --version 9.0.0-rc --pre

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

C:\> choco upgrade tomcat --version 9.0.0-rc --pre

Files

Hide
  • tools\chocolateyHelpers.ps1 Show
    function Set-ChocolateyPackageOptions {
        [CmdletBinding()]
        param(
            [Parameter(Mandatory=$True,Position=1)]
            [hashtable] $options
        )
        $packageParameters = $env:chocolateyPackageParameters;
    
        if ($packageParameters) {
            $parameters = ConvertFrom-StringData -StringData $env:chocolateyPackageParameters.Replace(" ", "`n")
            $parameters.GetEnumerator() | % {
               $options[($_.Key)] = ($_.Value)
            }
        }
    }
  • tools\chocolateyInstall.ps1 Show
    $PFFolder = if (Get-ProcessorBits -eq 64) { "$Env:ProgramFiles" } else { "$Env:ProgramFiles(x86)" }
    
    $options = @{
        version = '9.0.0.M19'
        unzipLocation = (Join-Path $PFFolder "Apache Software Foundation\tomcat")
        serviceName = 'Tomcat8'
    }
    
    $unzipParameters = @{
        packageName = 'tomcat'
        url = "https://archive.apache.org/dist/tomcat/tomcat-9/v$($options['version'])/bin/apache-tomcat-$($options['version'])-windows-x86.zip"
        url64bit = "https://archive.apache.org/dist/tomcat/tomcat-9/v$($options['version'])/bin/apache-tomcat-$($options['version'])-windows-x64.zip"
        checksum = 'f0189e3623491a3436cbbe17597cb833b52e14d9'
        checksumType = 'sha1'
        checksum64 = '518a1e727f57bdbeb59223f9ae018a199de35a86'
        checksumType64 = 'sha1'
    }
    
    if(!$PSScriptRoot){ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent }
    . "$PSScriptRoot\ChocolateyHelpers.ps1"
    
    Set-ChocolateyPackageOptions $options
    Install-ChocolateyZipPackage @unzipParameters -UnzipLocation $options['unzipLocation']
    
    $catalinaHome = Join-Path $options['unzipLocation'] "apache-tomcat-$($options['version'])";
    Install-ChocolateyEnvironmentVariable 'CATALINA_HOME' "$catalinaHome"
    
    $binPath =  Join-Path $catalinaHome 'bin'
    Push-Location $binPath
    Start-ChocolateyProcessAsAdmin ".\service.bat install $($options['serviceName'])"
    Pop-Location
    
    Export-CliXml -Path (Join-Path $PSScriptRoot 'options.xml') -InputObject $options
    
    Get-Service | Where-Object Name -eq $options['serviceName'] | Start-Service
    
  • tools\chocolateyUninstall.ps1 Show
    if(!$PSScriptRoot){ $PSScriptRoot = Split-Path $MyInvocation.MyCommand.Path -Parent }
    
    $optionsFile = (Join-Path $PSScriptRoot 'options.xml')
    
    if (!(Test-Path $optionsFile)) {
      throw "Install options file missing. Could not uninstall."
    }
    
    $options = Import-CliXml -Path $optionsFile
    $catalinaHome = Join-Path $options['unzipLocation'] "apache-tomcat-$($options['version'])";
    Install-ChocolateyEnvironmentVariable 'CATALINA_HOME' "$catalinaHome"
    
    $service = Get-Service | Where-Object Name -eq $options['serviceName']
    if ($service -ne $null) {
      Stop-Service $service
    }
    
    $binPath = Join-Path $catalinaHome 'bin'
    if (Test-Path $binPath) {
      Push-Location $binPath
      Start-ChocolateyProcessAsAdmin ".\service.bat uninstall $($options['serviceName'])"
      Pop-Location
    }
    
    if ((Get-ChildItem $options['unzipLocation'] | Measure-Object).Count -eq 1) { 
      Remove-Item $options['unzipLocation'] -Recurse -Force
    }
    else {
      Remove-Item (Join-Path $options['unzipLocation'] "apache-tomcat-$($options['version'])") -Recurse -Force
    }

Virus Scan Results

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.

Dependencies

Package Maintainer(s)

Software Author(s)

  • Apache Software Foundation

Tags

Release Notes

http://tomcat.apache.org/

Version History

Version Downloads Last updated Status
Apache Tomcat 9.0.24 5 Sunday, August 18, 2019 submitted
Apache Tomcat 9.0.21 1048 Saturday, June 8, 2019 approved
Apache Tomcat 9.0.20 795 Tuesday, May 14, 2019 approved
Apache Tomcat 9.0.19 485 Tuesday, April 30, 2019 approved
Apache Tomcat 9.0.0-rc 623 Friday, March 31, 2017 exempted
Apache Tomcat 8.5.12 26980 Friday, March 31, 2017 approved
Apache Tomcat 8.0.33 39578 Saturday, May 28, 2016 approved
Show More

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
Chocolatey.org uses cookies to enhance the user experience of the site.
Ok