Search code examples
javaweb-applicationstomcat7shared-librariesexternal

Shared library folder for deployed tomacat web application


I there any way to configure a shared external library location for multiple J2ee based web application which deployed in tomcat.


Solution

  • Place the shared libraries in Tomcat's common/lib folder, and they will be available for all the webapps deployed on that server.

    However, please note that deploying multiple applications on a single Tomcat server is considered bad practice. Tomcat is very lightweight, so running one instance per application is perfectly acceptable from a performance point of view. Also, it allows you to fine-tune Tomcat's memory, configuration, librairies, etc. differently for each web application.