Delegate ClassLoader with Tomcat

Use standard class loading delegation with Tomcat.
pull/50/head
Phillip Webb 11 years ago
parent 1c1f36c4ce
commit 1db12f5912

@ -152,6 +152,7 @@ public class TomcatEmbeddedServletContainerFactory extends
.getClassLoader() : ClassUtils.getDefaultClassLoader()); .getClassLoader() : ClassUtils.getDefaultClassLoader());
WebappLoader loader = new WebappLoader(context.getParentClassLoader()); WebappLoader loader = new WebappLoader(context.getParentClassLoader());
loader.setLoaderClass(TomcatEmbeddedWebappClassLoader.class.getName()); loader.setLoaderClass(TomcatEmbeddedWebappClassLoader.class.getName());
loader.setDelegate(true);
context.setLoader(loader); context.setLoader(loader);
if (isRegisterDefaultServlet()) { if (isRegisterDefaultServlet()) {
addDefaultServlet(context); addDefaultServlet(context);

Loading…
Cancel
Save