Package org.apache.jasper.runtime

Examples of org.apache.jasper.runtime.JspLoader


    };
   
  public boolean parseFile(PrintStream log, String file, Writer mapout)
    {
        try {
            JspLoader loader =
                    new JspLoader(getClass().getClassLoader(), this);
            CommandLineContext clctxt = new CommandLineContext(
                    loader, getClassPath(), file, uriBase, uriRoot, false,
                    this);
            if ((targetClassName != null) && (targetClassName.length() > 0)) {
                clctxt.setServletClassName(targetClassName);
                clctxt.lockClassName();
            }
            if (targetPackage != null) {
                clctxt.setServletPackageName(targetPackage);
                clctxt.lockPackageName();
            }
            if (dirset) {
                clctxt.setOutputInDirs(true);
            };
            File uriDir = new File(clctxt.getRealPath("/"));
            if (uriDir.exists()) {
                if ((new File(uriDir, "WEB-INF/classes")).exists()) {
                    loader.addJar(clctxt.getRealPath("/WEB-INF/classes"));
                }
                File lib = new File(clctxt.getRealPath("WEB-INF/lib"));
                if (lib.exists() && lib.isDirectory()) {
                    String[] libs = lib.list();
                    for (int i = 0; i < libs.length; i++) {
                        try {
                            loader.addJar(lib.getCanonicalPath()
                                    + File.separator
                                    + libs[i]);
                        } catch (IOException ioe) {
                            // failing a toCanonicalPath on a file that
                            // exists() should be a JVM regression test,
View Full Code Here

TOP

Related Classes of org.apache.jasper.runtime.JspLoader

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.