Or alternatively, I could setParentLoaderPriority(true), and somehow set my custom classloader as the parent, but it isn't clear to me how to do that. If I call Thread.currentThread.setContextClassLoader(myCustomClassLoader), will it work?

On 11/24/2012 1:58 PM, ccleve wrote:
I'm using Jetty 9, embedded, and would like to have webapps use a custom
classloader.

It's easy to set the classloader on a WebAppContext, but I'm also using
WebAppProvider to scan a directory, and that class lacks the
.setClassLoader() method. Should I just subclass WebAppProvider and
override createContextHandler() to add my own classloader? Or is there
an easier way?


_______________________________________________
jetty-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to