Package org.apache.jasper

Examples of org.apache.jasper.JspC


    }

    Thread.currentThread().setContextClassLoader(webAppClassLoader);

    if (jspc == null)
      jspc = new JspC();

    jspc.setWebXmlFragment(webXmlFragment);
    jspc.setUriroot(webAppSourceDirectory);
    jspc.setOutputDir(generatedClasses);
    jspc.setClassPath(webAppClassPath.toString());
View Full Code Here


 
  public static void compile(File inWebDir, File outWebDir,
                               WebBundleDescriptor wbd, String classpath,
                               ServerContext serverContext)
            throws DeploymentException {
    JspC jspc = new JspC();

        if (classpath != null && classpath.length() >0) {
        jspc.setClassPath(classpath);
        }
       
        // START SJSAS 6311155
        String appName = wbd.getApplication().getName();
        boolean delegate = true;
        com.sun.enterprise.deployment.runtime.web.ClassLoader clBean =
                wbd.getSunDescriptor().getClassLoader();
        if (clBean != null) {
            String value = clBean.getAttributeValue(
                    com.sun.enterprise.deployment.runtime.web.ClassLoader.DELEGATE);
            delegate = ConfigBeansUtilities.toBoolean(value);
        }

        // so far, this is not segragated per web bundle, all web-bundles will get the
        // same sysClassPath
        String sysClassPath = ASClassLoaderUtil.getModuleClassPath(
            serverContext.getDefaultHabitat(), appName, null);
        jspc.setSystemClassPath(sysClassPath);
        // END SJSAS 6311155

    verify(inWebDir, outWebDir);

    configureJspc(jspc, wbd);
    jspc.setOutputDir(outWebDir.getAbsolutePath());
    jspc.setUriroot(inWebDir.getAbsolutePath());
    jspc.setCompile(true);
    logger.info(startMessage);

    try {
      jspc.execute();
    }
    catch (Exception je) {
      throw new DeploymentException("JSP Compilation Error: " + je, je);
    }
    finally {
View Full Code Here

    return instance;
  }

  private void compileJsp(String forwardedUrl) throws JasperException {
    cleanCompilationDir();
    JspC jspC = new JspC();
    jspC.setUriroot(webContentPath);
    jspC.setJspFiles("." + forwardedUrl);
    jspC.setOutputDir(compilationDir.getAbsolutePath());
    jspC.setClassPath(compilationDir.getAbsolutePath());
    jspC.setCompile(true);
    LOG.debug("Compiling jsp " + forwardedUrl + " to: " + compilationDir.getAbsolutePath());
    jspC.execute();
  }
View Full Code Here

 
  public static void compile(File inWebDir, File outWebDir,
                               WebBundleDescriptor wbd, String classpath,
                               ServerContext serverContext)
            throws DeploymentException {
    JspC jspc = new JspC();

        if (classpath != null && classpath.length() >0) {
        jspc.setClassPath(classpath);
        }
       
        // START SJSAS 6311155
        String appName = wbd.getApplication().getName();

        // so far, this is not segragated per web bundle, all web-bundles will get the
        // same sysClassPath
        String sysClassPath = ASClassLoaderUtil.getModuleClassPath(
            serverContext.getDefaultServices(), appName, null);
        jspc.setSystemClassPath(sysClassPath);
        // END SJSAS 6311155

    verify(inWebDir, outWebDir);

    configureJspc(jspc, wbd);
    jspc.setOutputDir(outWebDir.getAbsolutePath());
    jspc.setUriroot(inWebDir.getAbsolutePath());
    jspc.setCompile(true);
    logger.log(Level.INFO, START_MESSAGE);

    try {
      jspc.execute();
    }
    catch (Exception je) {
      throw new DeploymentException("JSP Compilation Error: " + je, je);
    }
    finally {
View Full Code Here

 
  public static void compile(File inWebDir, File outWebDir,
                               WebBundleDescriptor wbd, String classpath,
                               ServerContext serverContext)
            throws DeploymentException {
    JspC jspc = new JspC();

        if (classpath != null && classpath.length() >0) {
        jspc.setClassPath(classpath);
        }
       
        // START SJSAS 6311155
        String appName = wbd.getApplication().getName();

        // so far, this is not segragated per web bundle, all web-bundles will get the
        // same sysClassPath
        String sysClassPath = ASClassLoaderUtil.getModuleClassPath(
            serverContext.getDefaultServices(), appName, null);
        jspc.setSystemClassPath(sysClassPath);
        // END SJSAS 6311155

    verify(inWebDir, outWebDir);

    configureJspc(jspc, wbd);
    jspc.setOutputDir(outWebDir.getAbsolutePath());
    jspc.setUriroot(inWebDir.getAbsolutePath());
    jspc.setCompile(true);
    logger.log(Level.INFO, START_MESSAGE);

    try {
      jspc.execute();
    }
    catch (Exception je) {
      throw new DeploymentException("JSP Compilation Error: " + je, je);
    }
    finally {
View Full Code Here

TOP

Related Classes of org.apache.jasper.JspC

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.