prefer-web-inf-classes has to be specified for the classes specified in Web-INF to take precendence over classes present in application library of weblogic server. I have a special case where I need the class loader to use one specific jar from WEB-INF folder. Is there any way of doing this?
To prefer all packages which are in your WEB-INF/lib over those which are bundled with your WebLogic lib set <prefer-web-inf-classes>
to true in your weblogic.xml
or application-weblogic.xml
.
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
For more detail see Using a Filtering Classloader, weblogic.xml Deployment Descriptor Elements and WebLogic's ClassLoaders, Filtering ClassLoader and ClassLoader Analysis Tool .
If you are not sure if the right class is loaded you can use the Classloader Analysis Tool for WebLogic.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With