1

I need to include a few custom jar files in Tomcat that are referenced by a Java web application deployed on Tomcat.

If I add these libraries under <tomcat_base_folder>/lib, my application work perfectly fine, but I wanted to check if I can logically group them and move to different folders and modify any config files on Tomcat to pick these additional locations.

For example, can I create a folder by name drivers under <tomcat_base_folder> and add the ojdbc and db2cc jar files under this folder and reference the drivers folder also in the classpath somehow? Is there a way to include the custom library locations?

Appreciate any pointers on this.

Eugène Adell
  • 3,089
  • 2
  • 18
  • 34
Prasann
  • 1,263
  • 2
  • 11
  • 18

1 Answers1

1

As documented in Tomcat's class-loader-howto, you need to edit conf/catalina.properties and add your libraries to this property : common.loader

The syntax is quite self understanding.

Eugène Adell
  • 3,089
  • 2
  • 18
  • 34