public void init(ServletConfig config) throws ServletException {
super.init(config);
this.config = config;
this.context = config.getServletContext();
this.serverInfo = context.getServerInfo();
this.engine = ServletEngine.getServletEngine(serverInfo);
if (engine == null)
Constants.message("jsp.error.bad-servlet-engine", Constants.FATAL_ERRORS);
else {
options = new Options(config, context);
parentClassLoader = (ClassLoader) context.getAttribute(Constants.SERVLET_CLASS_LOADER);
if (parentClassLoader == null)
parentClassLoader = this.getClass().getClassLoader();
Constants.message("jsp.message.parent_class_loader_is",
new Object[] {
parentClassLoader.toString()
}, Constants.MED_VERBOSITY);
this.loader = new JspLoader(context,
parentClassLoader,
options);
if (firstTime) {
firstTime = false;
Constants.message("jsp.message.scratch.dir.is",
new Object[] {
options.scratchDir().toString()
}, Constants.LOW_VERBOSITY );
Constants.message("jsp.message.dont.modify.servlets", Constants.LOW_VERBOSITY);
}
}
JspFactory.setDefaultFactory(new JspFactoryImpl());
}
|