To precise the context, I am using Eclipse with its workspace metadata for my Tomcat 7's configuration.

I have this line in my catalina.properties :

shared.loader=${catalina.home}/shared/conf

Which, should load all the files contained in ${catalina.home}/shared/conf before all the files contained in my web application (WEB-INF/classes).

But this is not what I observe, the files contained in my application always override those in my shared loader (ie. log4j.xml, etc.).

Any idea ?

有帮助吗?

解决方案

First of all, Tomcat 4.1 hasn't been supported for over 4 years.

Second, you haven't read the page correctly. Look at the end of the "Class Loader Definitions" section where the search order is explicitly described.

If you want to change the delegation order then look at the delegate attribute of the Loader element. This is supported in all Tomcat versions from 4.1.x to 8.0.x.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top