Enabling the Tomcat 5.5 Shared Folder in Tomcat 6.0/7.0 (2009736)
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.
To enable the shared folder in Tomcat 6.0/7.0:
- Create the physical directories. In your TOMCAT_BASE directory, create the following folder structure.
Note: The TOMCAT_BASE may be different than TOMCAT_HOME.
- 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:
- Save conf/catalina.properties and start Tomcat.
The shared class loader should now be configured to load classes from the shared folder.