Search code examples
weblogic

Weblogic Configuration - prefer-web-inf-classes


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?


Solution

  • You may want to look at Filtering Classloaders?

    This allows to specify on a package-by-package level just which classloader to use.

    You want to be very careful with this, though. Are you sure you already are in CLassloader Hell, so you must resort to this kind of stuff, and there's really no alternative?

    Did you consider putting the JAR into the APP-INF/lib folder of your EAR? Or move "all but the one you need in WEB-INF/lib" out to APP-INF/lib?