Examples of JspCompiler


Examples of net.sf.jsptest.compiler.api.JspCompiler

     * @param httpMethod
     *            "GET" or "POST".
     */
    protected void request(String path, String httpMethod) throws Exception {
        validatePath(path);
        JspCompiler compiler = JspCompilerFactory.newInstance();
        log.debug("Using compiler " + compiler.getClass().getName() + " and webroot "
                + new File(getWebRoot()).getAbsolutePath());
        compiler.setWebRoot(getWebRoot());
        compiler.setOutputDirectory(getOutputDirectory());
        Jsp jsp = compiler.compile(path, substituteTaglibs);
        log.debug("Simulating a request to " + path);
        execution = jsp.request(httpMethod, requestAttributes, sessionAttributes, requestParameters);
    }
View Full Code Here

Examples of nsf.playground.jsp.JspCompiler

      String sourceCode = null;
      try {
        JavaSnippetBean bean = (JavaSnippetBean)ManagedBeanUtil.getBean(FacesContext.getCurrentInstance(), "javaSnippetBean");
        Class<JspFragment> jspClass = bean.getCompiledClass(jspClassName);
        if(jspClass==null) {
          JspCompiler compiler = new JspCompiler();
          sourceCode = compiler.compileJsp(jsp, jspClassName);
          if(false) {
            pw.println("<pre>");
            pw.println(HtmlUtil.toHTMLContentString(sourceCode, false));
            pw.println("</pre>");
          }
          jspClass = bean.compileSnippet(jspClassName, sourceCode);
        }
        if(jspClass!=null) {
          JspFragment f = jspClass.newInstance();
          f.exec(new JspSampleWriter(pw),req,resp);
        }
      } catch(Throwable e) {
        pw.println("Execution error");
        pw.println("<pre>");
       
        StringWriter sw = new StringWriter();
        PrintWriter psw = new PrintWriter(sw);
        if(e instanceof IExceptionEx) {
          ((IExceptionEx)e).printExtraInformation(psw);
          psw.println("");
        }
        if(sourceCode==null) {
          JspCompiler compiler = new JspCompiler();
          sourceCode = compiler.compileJsp(jsp, jspClassName);
        }
        if(sourceCode!=null) {
          printSourceCode(psw,sourceCode,true,-1);
          //psw.println(HtmlUtil.toHTMLContentString(sourceCode, false));
        }
View Full Code Here

Examples of org.apache.jasper.compiler.JspCompiler

  }

        if (compilerPath != null)
            javac.setCompilerPath(compilerPath);

        Compiler jspCompiler = new JspCompiler(this);
  jspCompiler.setJavaCompiler(javac);
        
        return jspCompiler;
    }
View Full Code Here

Examples of org.apache.jasper.compiler.JspCompiler

  }

        if (compilerPath != null)
            javac.setCompilerPath(compilerPath);

        Compiler jspCompiler = new JspCompiler(this);
  jspCompiler.setJavaCompiler(javac);
        
        return jspCompiler;
    }
View Full Code Here

Examples of org.apache.jasper.compiler.JspCompiler

     * Create a "Compiler" object based on some init param data. This
     * is not done yet. Right now we're just hardcoding the actual
     * compilers that are created.
     */
    public Compiler createCompiler() throws JasperException {
        Compiler jspCompiler = new JspCompiler(this);
        jspCompiler.setJavaCompiler(new SunJavaCompiler());
        return jspCompiler;
    }
View Full Code Here

Examples of org.apache.jasper.compiler.JspCompiler

  }

        if (compilerPath != null)
            javac.setCompilerPath(compilerPath);

        Compiler jspCompiler = new JspCompiler(this);
  jspCompiler.setJavaCompiler(javac);
        
        return jspCompiler;
    }
View Full Code Here

Examples of org.apache.jasper.compiler.JspCompiler

  }

        if (compilerPath != null)
            javac.setCompilerPath(compilerPath);

        Compiler jspCompiler = new JspCompiler(this);
  jspCompiler.setJavaCompiler(javac);
        
        return jspCompiler;
    }
View Full Code Here

Examples of org.apache.jasper.compiler.JspCompiler

  }

        if (compilerPath != null)
            javac.setCompilerPath(compilerPath);

        Compiler jspCompiler = new JspCompiler(this);
  jspCompiler.setJavaCompiler(javac);
        
        return jspCompiler;
    }
View Full Code Here

Examples of org.apache.jasper.compiler.JspCompiler

  }

        if (compilerPath != null)
            javac.setCompilerPath(compilerPath);

        Compiler jspCompiler = new JspCompiler(this);
  jspCompiler.setJavaCompiler(javac);
        
        return jspCompiler;
    }
View Full Code Here

Examples of org.apache.jasper.compiler.JspCompiler

  }

        if (compilerPath != null)
            javac.setCompilerPath(compilerPath);

        Compiler jspCompiler = new JspCompiler(this);
  jspCompiler.setJavaCompiler(javac);
        
        return jspCompiler;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.