cPanel & WHM no longer develops or updates EasyApache 3. We deprecated EasyApache 3 on December 31, 2018. We removed support for EasyApache 3 in cPanel & WHM version 78.
Migrate from Tomcat 5.5 to Tomcat 7 - EasyApache - cPanel Documentation

You can find our user documentation at

Check out our new API beta site!

Page tree
Skip to end of metadata
Go to start of metadata


Apache Tomcat is the Java web server for Apache. This document includes information on Tomcat compatibility, and changes between Tomcat 5.5 and Tomcat 7.

For more information on Tomcat, read our Introduction to Tomcat documentation.


EasyApache 3 does not support new installations of Tomcat.

As of cPanel & WHM version 76, EasyApache 4 now supports Tomcat 8.5. For more information, read our Tomcat documentation.

Versions of Tomcat

Use the following table to determine which versions of Tomcat are available for your configuration:

Version of cPanel & WHMCurrent Apache VersionCurrent Tomcat VersionYou may install
11.36 or earlierAnyNoneTomcat 5.5
11.36 or earlierAnyTomcat 5.5Tomcat 5.5 or later2.2 or laterNoneTomcat 7* or later2.2 or laterTomcat 5.5Tomcat 7* or later2.2 or laterTomcat 7*Tomcat 7


  • If you upgrade to Tomcat 7, you cannot downgrade back to Tomcat 5.5 through EasyApache.
  • Tomcat 7 will appear as an option in all releases of cPanel & WHM version 11.38, but will only install correctly for cPanel & WHM version or later.


You cannot run Tomcat 5.5 and Tomcat 7 simultaneously.

Featured documentation

  EasyApache 3


Change Log Release Notes  



Migrate from Tomcat 5.5 to 7

How to Deploy Java Applications


EasyApache 3 does not support new installations of Tomcat.

As of cPanel & WHM version 76, EasyApache 4 now supports Tomcat 8.5. For more information, read our Tomcat documentation.

Differences between Tomcat 5.5 and Tomcat 7

OpenJDK 7

Tomcat uses a Java Development Kit (JDK). Tomcat 5.5 uses the Sun-implemented JDK. Tomcat 7 uses the community-developed OpenJDK 7 RPM that your operating system provides. CentOS and Red Hat® versions 5.9, 6.3, 6.4, or later include the OpenJDK 7 RPM that Tomcat 7 requires.


If your operating system does not support the OpenJDK 7 RPM, you cannot use Tomcat 7.

For more information on OpenJDK 7, visit the OpenJDK website.

EasyApache uses RPM files to install Tomcat 7

EasyApache uses the mod_jk Apache module to install Tomcat 5.5.


We will continue to distribute the mod_jk Apache module by tarball to ensure compatibility.

EasyApache uses RPM files to install Tomcat 7. EasyApache installs the Tomcat 7 software in the /usr/local/easy directory. A Tomcat 7 installation includes the following RPM files:

  • Tomcat 7
  • JSVC
  • MySQL® Connector/J

The RPM files follow the following naming convention:


For example:



The functionality of EasyApache does not change when it uses an RPM to install software.

Automatic updates without rebuilding EasyApache

One of the benefits to Tomcat 7 is that you can update the software without performing an EasyApache build. If you wish to update Tomcat 7 to the latest version and do not wish to rebuild EasyApache, perform the following steps:

  1. Run EasyApache in the EasyApache 3 interface (Home >> Software >> EasyApache 3)
    • The first step EasyApache performs is to update the EasyApache software, the EasyApache configuration files, and the RPM versions list.
    • For more information on EasyApache, view our EasyApache documentation.
  2. After the update is complete, EasyApache will display the Profile interface. Exit EasyApache.
    • To exit EasyApache, select any other interface in WHM.
  3. Run either the upcp script or the check_cpanel_rpms script.

Tomcat software versions

Tomcat 7 includes newer versions of the following software:

  • Servlet 3.0
  • Expression Language 2.2
  • JavaServer Pages 2.2

Your applications may require modifications before they will work in the new environments.

Tomcat 7 compiles JavaServer Pages (JSPs) with the Eclipse Compiler for Java (ecj) on Java 6. Your JSPs may require modifications to work in Tomcat 7.

Manager and admin roles

Tomcat 5.5 uses the manager and admin roles. Tomcat 7 replaces the manager and admin roles with the following roles:

Admin roles:

  • admin-gui
  • admin-script

Manager roles:

  • manager-gui
  • manager-jmx
  • manager-script
  • manager-status


You must assign roles manually because EasyApache does not migrate the user definition database from Tomcat 5.5 to Tomcat 7. Tomcat 7 applications rely on specific permissions that are assigned to roles.

Install location

Tomcat 5.5

EasyApache installs Tomcat 5.5 in the /usr/local/jakarta/apache-tomcat-5.5.XX directory. The /usr/local/jakarta/tomcat file is a symlink to the Tomcat installation.

Tomcat 7

EasyApache installs Tomcat 7 in the /usr/local/easy/share/easy-tomcat7 directory.

If you upgrade from Tomcat 5.5 to Tomcat 7, EasyApache will delete the /usr/local/jakarta/tomcat symlink, and the files that support Tomcat 5.5. The original Tomcat 5.5 directory and libraries will remain in place if you need to migrate old libraries to the new location.

Startup options file locations

Tomcat 5.5

The Tomcat 5.5 startup script looks for options in the /var/cpanel/tomcat.options file.

When the startup script starts the Java service (jsvc), the startup script passes these options to the /usr/sbin/starttomcat script.

Tomcat 7

The Tomcat 7 startup script looks for options in the /usr/local/easy/share/easy-tomcat7/conf/tomcat.conf file. The system administrator can override these options with the /var/cpanel/tomcat.options configuration file.

When the startup script starts the Java service (jsvc), the startup script passes the options to the /etc/init.d/easy-tomcat7 script.

Environment variables

The $CATALINA_HOME environmental variable refers to the shared installation directory. The $CATALINA_BASE environmental variable refers to the root directory for a specific instance.

  • In Tomcat 5.5, the $CATALINA_HOME environmental variable and the $CATALINA_BASE environmental variable point to the /usr/local/jakarta/tomcat directory.
  • In Tomcat 7, the $CATALINA_HOME environmental variable and the $CATALINA_BASE environmental variable point to the /usr/local/easy/share/easy-tomcat7 directory.

Reinstall and re-enable user servlets

After EasyApache completes an upgrade from Tomcat 5.5 to Tomcat 7, EasyApache will enable servlet support for any domains that had servlet support enabled prior to the upgrade.

You will need to reinstall and re-enable user servlets if you perform any of the following actions:

  • Modify an account with servlets.
  • Park a domain on an account with servlets.
  • Unpark a domain from an account with servlets.

For more information about how to enable Tomcat Servlets, read our Introduction to Tomcat documentation.


We will automate this process in a future release of EasyApache.

Library directory changes

Tomcat 5.5

Tomcat 5.5 stores libraries in the following directory structure:

  • Tomcat 5.5 stores each Java shared library in a separate directory.
  • Individual <classname>.class files which are in the $CATALINA_HOME/common/classes directory.
  • <libraryname>.jar files, which are in the $CATALINA_HOME/common/lib directory.

Tomcat 7

Tomcat 7 uses the /usr/local/easy/share/easy-tomcat7/lib ( lib) directory. The lib directory replaces the following directories from Tomcat 5.5:

  • server
  • shared
  • common

Tomcat 7 stores the following libraries in the $CATALINA_HOME/lib directory:

  • Java shared libraries
  • <libraryname>.jar files
  • <classname>.class files – Each class file is in a sub directory inside the $CATALINA_HOME/lib directory, with a directory hierarchy that mimics the class name.
    • For example, the My.Example.Name class is in the $CATALINA_BASE/lib/My/Example/Name.class directory.

InvokerServlet changes

Tomcat 5.5

cPanel & WHM enables the InvokerServlet method for Tomcat 5.5 by default. The InvokerServlet method allows you to designate a directory for servlets. The cPanel & WHM configuration of Tomcat 5.5 maps the InvokerServlet method to the the httpservlet and httpservlets directories.

To allow web users to invoke an HttpServlet-enabled servlet class files via URL, store the files in the httpservlet and httpservlets directories.

Tomcat 7

cPanel & WHM disables the use of the InvokerServlet method for Tomcat 7 by default.


If you invoke a servlet through the InvokerServlet method, it will not function and Tomcat 7 will produce an error by default.

The change in functionality is due to how Tomcat 7 runs the InvokerServlet method. Tomcat 7 only allows the InvokerServlet method to run in privileged mode, which poses a significant security risk.


We strongly recommend that you do not enable the InvokerServlet method. Instead, we recommend that you package servlets in WAR files.

To disable the the InvokerServlet method, cPanel & WHM comments out the mapping for the InvokerServlet method. To enable the InvokerServlet method, remove the commenting markup around the InvokerServlet mapping.

Log changes

Tomcat 5.5

Tomcat 5.5 uses the cPanel & WHM default logging facility, Valve, which stores logs in the /usr/local/jakarta/logs/ directory.

Tomcat 7

Tomcat 7 also uses the Valve logging facility, but stores logs in the /var/log/easy-tomcat7 directory. The logrotate.d application manages log rotation for Tomcat 7. Your operating system provides the logrotate.d application.

The logrotate.d application rotates Tomcat 7 logs weekly and keeps them for one year.

Account transfers

The following table includes information about how to transfer Tomcat accounts from one server to another:

cPanel & WHM version of destination serverServlet behavior or latercPanel & WHM automatically enables Servlets. or earlierYou must manually enable Servlets.


You must install Tomcat on the destination server before you transfer the accounts.

For more information about how to enable Tomcat Servlets, read our  Introduction to Tomcat documentation.

WAR file deployment changes

Tomcat 5.5

In a Tomcat 5.5 installation, you unpack and deploy WAR files into the the work directory. For example, to unpack and deploy a WAR file named filename for the domain , unpack the file into the /usr/local/jakarta/tomcat/work/Catalina/  directory.

Tomcat 7

cPanel & WHM disables the unpackWARs option in Tomcat 7 installations for permissions reasons. The process to unpack and deploy WAR files did not change for Tomcat 7.

The work directory has changed to the /var/cache/easytomcat7/Catalina/  directory.


If you re-enable the unpackWARs option, WAR files will fail to deploy properly and you will see an error that is similar to the following:

Jun 26, 2013 2:34:34 PM org.apache.catalina.loader.WebappClassLoader clearReferencesJdbc
WARNING: JDBC driver de-registration failed for web application [/foo]
        at org.apache.catalina.loader.WebappClassLoader.clearReferencesJdbc(
        at org.apache.catalina.loader.WebappClassLoader.clearReferences(
        at org.apache.catalina.loader.WebappClassLoader.stop(
        at org.apache.catalina.loader.WebappLoader.stopInternal(
        at org.apache.catalina.util.LifecycleBase.stop(
        at org.apache.catalina.core.StandardContext.stopInternal(
        at org.apache.catalina.util.LifecycleBase.stop(
        at org.apache.catalina.core.ContainerBase$
        at org.apache.catalina.core.ContainerBase$
        at java.util.concurrent.FutureTask$Sync.innerRun(
        at java.util.concurrent.ThreadPoolExecutor.runWorker(
        at java.util.concurrent.ThreadPoolExecutor$

Test accounts

Tomcat 5.5

If you install servlet support in Tomcat 5.5, Tomcat copies two files to the user's public_html directory:

  • jsptest.jsp – To access this file, use the  address.
  • ServletsTestPage.class — To access this file, use the address. 


In the above examples, replace with the user's domain.

Tomcat 7

If you install servlet support in Tomcat 7, Tomcat copies only the jsptest.jsp file to the user's public_html directory.

deployXML disabled

cPanel & WHM sets the deployXML variable to false for Tomcat 7 installations.

Related documentation

  • Apache Tomcat – For more information on the Apache Tomcat web server, view Apache's Tomcat website.
  • Apache Tomcat Migration Guide – For more information on how to migrate the Apache Tomcat web server, read Apache's Tomcat Migration Guide documentation.