Search in sources :

Example 1 with JspConfig

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);
}
Also used : TldCache(org.apache.jasper.compiler.TldCache) JspConfig(org.apache.jasper.compiler.JspConfig) JspRuntimeContext(org.apache.jasper.compiler.JspRuntimeContext) TagPluginManager(org.apache.jasper.compiler.TagPluginManager) File(java.io.File) JspCServletContext(org.apache.jasper.servlet.JspCServletContext) URL(java.net.URL) PrintWriter(java.io.PrintWriter) SAXException(org.xml.sax.SAXException)

Aggregations

File (java.io.File)1 PrintWriter (java.io.PrintWriter)1 URL (java.net.URL)1 JspConfig (org.apache.jasper.compiler.JspConfig)1 JspRuntimeContext (org.apache.jasper.compiler.JspRuntimeContext)1 TagPluginManager (org.apache.jasper.compiler.TagPluginManager)1 TldCache (org.apache.jasper.compiler.TldCache)1 JspCServletContext (org.apache.jasper.servlet.JspCServletContext)1 SAXException (org.xml.sax.SAXException)1