use of org.apache.jasper.compiler.JspConfig in project tomcat by apache.
the class JspC method initServletContext.
protected void initServletContext(ClassLoader classLoader) throws IOException, JasperException {
// TODO: should we use the Ant Project's log?
PrintWriter log = new PrintWriter(System.out);
URL resourceBase = new File(uriRoot).getCanonicalFile().toURI().toURL();
context = new JspCServletContext(log, resourceBase, classLoader, isValidateXml(), isBlockExternal());
if (isValidateTld()) {
context.setInitParameter(Constants.XML_VALIDATION_TLD_INIT_PARAM, "true");
}
initTldScanner(context, classLoader);
try {
scanner.scan();
} catch (SAXException e) {
throw new JasperException(e);
}
tldCache = new TldCache(context, scanner.getUriTldResourcePathMap(), scanner.getTldResourcePathTaglibXmlMap());
context.setAttribute(TldCache.SERVLET_CONTEXT_ATTRIBUTE_NAME, tldCache);
rctxt = new JspRuntimeContext(context, this);
jspConfig = new JspConfig(context);
tagPluginManager = new TagPluginManager(context);
}
Aggregations