URLClassLoader urlC = new URLClassLoader(new URL[]{url},
Thread.currentThread().getContextClassLoader());
if (getServletClassName() != null && servlet == null) {
try {
servlet = (Servlet) urlC.loadClass(getServletClassName()).newInstance();
} catch (NullPointerException ex) {
// We failed to load the servlet, let's try directly.
servlet = (Servlet) Thread.currentThread().getContextClassLoader()
.loadClass(servletClassName).newInstance();
}