I want to change the place of putting the .jar files from Web-Inf/lib to any other place.is there any way to change it without impacting my project. Thanks:)
Asked
Active
Viewed 747 times
0
-
If I'm not mistaken WEB-INF/lib is required by the Servlet/JavaEE specs, so I doubt there is a way to do it. Besides what's the reasoning? What problem are you trying to solve. – Oct 01 '12 at 06:30
-
We will be running more than one web application on the same tomcat (7.0.22), so we wondered whether there will be a benefit in moving all jars to tomcat/lib instead of having them in each application’s WEB-INF/lib (since our applications have almost identical dependencies). What this gives as benefit for sure, without even testing, is that the classes are loaded by the parent classloader, and are loaded only once, rather than by each app’s classloader – Ashu-Goel Oct 01 '12 at 07:06
-
We will be running more than one web application on the same tomcat (7.0.22), so we wondered whether there will be a benefit in moving all jars to tomcat/lib instead of having them in each application’s WEB-INF/lib (since our applications have almost identical dependencies). What this gives as benefit for sure, without even testing, is that the classes are loaded by the parent classloader, and are loaded only once, rather than by each app’s classloader – Ashu-Goel Oct 01 '12 at 07:07
1 Answers
0
There is a common/lib folder in the Tomcat installation directory. Your application projects can then refer to this location for jars. Please also read: Does Tomcat load the same library file into memory twice if they are in two web apps?