// This is to maintain the original protocol.
destroy();
+ Servlet servlet = null;
+
try {
servletClass = ctxt.load();
- theServlet = (Servlet) servletClass.newInstance();
+ servlet = (Servlet) servletClass.newInstance();
AnnotationProcessor annotationProcessor = (AnnotationProcessor) config.getServletContext().getAttribute(AnnotationProcessor.class.getName());
if (annotationProcessor != null) {
- annotationProcessor.processAnnotations(theServlet);
- annotationProcessor.postConstruct(theServlet);
+ annotationProcessor.processAnnotations(servlet);
+ annotationProcessor.postConstruct(servlet);
}
} catch (IllegalAccessException e) {
throw new JasperException(e);
throw new JasperException(e);
}
- theServlet.init(config);
+ servlet.init(config);
if (!firstTime) {
ctxt.getRuntimeContext().incrementJspReloadCount();
}
+ theServlet = servlet;
reload = false;
}
}
<fix>
Skip BOM when reading a JSP file. (remm)
</fix>
+ <fix>
+ <bug>42072</bug> Don't call destroy() if the associated init() fails.
+ Patch provided by Kawasima Kazuh. (markt)
+ </fix>
</changelog>
</subsection>
</section>