Search in sources :

Example 1 with JspConfig

use of org.apache.sling.scripting.jsp.jasper.compiler.JspConfig in project sling by apache.

the class JspcMojo method initServletContext.

// ---------- Additional Settings ------------------------------------------
private void initServletContext() throws IOException, DependencyResolutionRequiredException {
    if (loader == null) {
        initClassLoader();
    }
    context = new JspCServletContext(getLog(), new URL("file:" + uriSourceRoot.replace('\\', '/') + '/'));
    tldLocationsCache = new JspCTldLocationsCache(context, true, loader);
    JavaCompiler compiler = new EclipseJavaCompiler();
    ClassLoaderWriter writer = new JspCClassLoaderWriter(loader, new File(outputDirectory));
    IOProvider ioProvider = new JspCIOProvider(loader, compiler, writer);
    rctxt = new JspRuntimeContext(context, this, ioProvider);
    jspConfig = new JspConfig(context);
    tagPluginManager = new TagPluginManager(context);
}
Also used : ClassLoaderWriter(org.apache.sling.commons.classloader.ClassLoaderWriter) JspConfig(org.apache.sling.scripting.jsp.jasper.compiler.JspConfig) EclipseJavaCompiler(org.apache.sling.commons.compiler.impl.EclipseJavaCompiler) TagPluginManager(org.apache.sling.scripting.jsp.jasper.compiler.TagPluginManager) JavaCompiler(org.apache.sling.commons.compiler.JavaCompiler) EclipseJavaCompiler(org.apache.sling.commons.compiler.impl.EclipseJavaCompiler) URL(java.net.URL) JspRuntimeContext(org.apache.sling.scripting.jsp.jasper.compiler.JspRuntimeContext) IOProvider(org.apache.sling.scripting.jsp.jasper.IOProvider) JarFile(java.util.jar.JarFile) File(java.io.File)

Aggregations

File (java.io.File)1 URL (java.net.URL)1 JarFile (java.util.jar.JarFile)1 ClassLoaderWriter (org.apache.sling.commons.classloader.ClassLoaderWriter)1 JavaCompiler (org.apache.sling.commons.compiler.JavaCompiler)1 EclipseJavaCompiler (org.apache.sling.commons.compiler.impl.EclipseJavaCompiler)1 IOProvider (org.apache.sling.scripting.jsp.jasper.IOProvider)1 JspConfig (org.apache.sling.scripting.jsp.jasper.compiler.JspConfig)1 JspRuntimeContext (org.apache.sling.scripting.jsp.jasper.compiler.JspRuntimeContext)1 TagPluginManager (org.apache.sling.scripting.jsp.jasper.compiler.TagPluginManager)1