Enabling the Tomcat 5.5 Shared Folder in Tomcat 6.0/7.0
search cancel

Enabling the Tomcat 5.5 Shared Folder in Tomcat 6.0/7.0

book

Article ID: 344086

calendar_today

Updated On:

Products

VMware Support Only for Apache Tomcat

Issue/Introduction

The default configuration of the class loaders was changed between Tomcat 5.5-6.0/7.0:
  • The folders in Tomcat 5.5 were shared, common, and server. These folders held the JAR and Class files that were made available to the shared, common and server class loaders.
  • In Tomcat 6.0/7.0, the shared, common, and server folders are condensed down to one folder named lib. The contents of the lib folder dictate the classes available to the shared, common, and server class loaders.
In some situations, it may be advantageous to have a separate shared folder (as with Tomcat 5.5).
This article provides information on configuring Tomcat 6.0/7.0 to enable a shared folder.


Environment

Apache Tomcat 7
Apache Tomcat 6
VMware vFabric tc Server 2.1
Apache Tomcat 5.5
VMware vFabric tc Server 2.6
VMware vFabric tc Server 2.0
VMware vFabric tc Server 2.5

Cause

Resolution

To enable the shared folder in Tomcat 6.0/7.0:
  1. Create the physical directories. In your TOMCAT_BASE directory, create the following folder structure.

    Note: The TOMCAT_BASE may be different than TOMCAT_HOME.

    - Shared
    - Classes
    - Lib

  2. Modify the conf/catalina.properties file so that it instructs Tomcat 6.0/7.0 to use the shared, common and server directories rather than the lib directory. Make the following changes to your conf/catalina.properties file. Locate the shared.loader+ property and change it to appear like:

    shared.loader=${catalina.base}/shared/classes,${catalina.base}/shared/lib/*.jar

  3. Save conf/catalina.properties and start Tomcat.
The shared class loader should now be configured to load classes from the shared folder.