ClassLoader classLoader) throws WebAppConfigurationException {
if (classLoader instanceof URLClassLoader) {
return (URLClassLoader) classLoader;
}
if (classLoader instanceof JasperHack) {
JasperHack ugly = (JasperHack) classLoader;
URL[] classLoaderUrls = null;
try {
classLoaderUrls = ugly.getUrls();
} catch (IOException ex) {
throw new WebAppConfigurationException(ex);
}
URLClassLoader whatJasperExpects =
new URLClassLoader(classLoaderUrls, classLoader);