Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Weblogic Configuration - prefer-web-inf-classes

Tags:

weblogic

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?

like image 712
Punter Vicky Avatar asked Nov 17 '11 11:11

Punter Vicky


1 Answers

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.

like image 186
Paul Wasilewski Avatar answered Sep 18 '22 11:09

Paul Wasilewski