// If no instance, class load, then call init()
ClassLoader cl = Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(this.webAppConfig.getLoader());
Servlet newInstance = null;
Throwable otherError = null;
try {
Class servletClass = Class.forName(classFile, true, this.webAppConfig.getLoader());
newInstance = (Servlet) servletClass.newInstance();
this.isSingleThreadModel = Class.forName("javax.servlet.SingleThreadModel").isInstance(newInstance);
// Initialise with the correct classloader
Logger.log(Logger.DEBUG, Launcher.RESOURCES, "ServletConfiguration.init", this.servletName);
newInstance.init(this);
this.instance = newInstance;
} catch (ClassNotFoundException err) {
Logger.log(Logger.WARNING, Launcher.RESOURCES,
"ServletConfiguration.ClassLoadError", this.classFile, err);
setUnavailable(newInstance);