Works wls:prefer-web-inf-classes with external lib?

240 views Asked by At

I know that there are hundreds of post about wls:prefer-web-inf-classes but I still having some doubts about how it works.

If I have an application that relies on another lib:

- my-app.war  ---
                 |
- libs.war  < ---  

If I set wls:prefer-web-inf-classes to true Weblogic classloader prefers my my-app.war libraries but not classes in libs.war, right?

According to the [docs](By default, this element is set to False. Setting this element to True subverts the classloader delegation model so that class definitions from the Web application are loaded in preference to class definitions in higher-level classloaders. This allows a Web application to use its own version of a third-party class, which might also be part of WebLogic Server. See weblogic.xml Deployment Descriptor Elements.)

By default, this element is set to False. Setting this element to True subverts the classloader delegation model so that class definitions from the Web application are loaded in preference to class definitions in higher-level classloaders. This allows a Web application to use its own version of a third-party class, which might also be part of WebLogic Server. See weblogic.xml Deployment Descriptor Elements.

The element, if set to true, will cause classes located in the WEB-INF directory of a Web application to be loaded in preference to classes loaded in the application or system classloader. The default value is false. A value specified in the console will take precedence over a value set manually.

0

There are 0 answers