Search in sources :

Example 36 with JasperException

use of org.apache.jasper.JasperException in project tomcat by apache.

the class JspRuntimeLibrary method handleSetProperty.

public static void handleSetProperty(Object bean, String prop, double value) throws JasperException {
    try {
        Method method = getWriteMethod(bean.getClass(), prop);
        method.invoke(bean, new Object[] { Double.valueOf(value) });
    } catch (Exception ex) {
        Throwable thr = ExceptionUtils.unwrapInvocationTargetException(ex);
        ExceptionUtils.handleThrowable(thr);
        throw new JasperException(ex);
    }
}
Also used : JasperException(org.apache.jasper.JasperException) Method(java.lang.reflect.Method) ServletException(javax.servlet.ServletException) JspException(javax.servlet.jsp.JspException) IOException(java.io.IOException) JasperException(org.apache.jasper.JasperException)

Example 37 with JasperException

use of org.apache.jasper.JasperException in project Payara by payara.

the class AllJSPsMustBeCompilable method check.

public Result check(WebBundleDescriptor descriptor) {
    Result result = getInitializedResult();
    ComponentNameConstructor compName = getVerifierContext().getComponentNameConstructor();
    // initialize good result
    addGoodDetails(result, compName);
    result.addGoodDetails(smh.getLocalString(getClass().getName() + ".passed", "All JSPs are compilable."));
    // set default status to PASSED
    result.setStatus(Result.PASSED);
    // initialize error results.
    addErrorDetails(result, compName);
    result.addErrorDetails(smh.getLocalString(getClass().getName() + ".exception", "Error: Some JSPs bundled inside [ {0} ] could not be compiled. See details below.", new Object[] { descriptor.getName() }));
    for (JasperException e : compile(descriptor)) {
        result.failed(formatMessage(descriptor, e.toString()));
    }
    return result;
}
Also used : JasperException(org.apache.jasper.JasperException) ComponentNameConstructor(com.sun.enterprise.tools.verifier.tests.ComponentNameConstructor) Result(com.sun.enterprise.tools.verifier.Result)

Aggregations

JasperException (org.apache.jasper.JasperException)37 IOException (java.io.IOException)29 ServletException (javax.servlet.ServletException)20 JspException (javax.servlet.jsp.JspException)17 Method (java.lang.reflect.Method)14 FileNotFoundException (java.io.FileNotFoundException)7 File (java.io.File)3 HashMap (java.util.HashMap)3 UnavailableException (javax.servlet.UnavailableException)3 TagInfo (javax.servlet.jsp.tagext.TagInfo)3 SAXException (org.xml.sax.SAXException)3 FileOutputStream (java.io.FileOutputStream)2 InputStream (java.io.InputStream)2 URISyntaxException (java.net.URISyntaxException)2 URL (java.net.URL)2 Map (java.util.Map)2 Servlet (javax.servlet.Servlet)2 TagFileInfo (javax.servlet.jsp.tagext.TagFileInfo)2 Result (com.sun.enterprise.tools.verifier.Result)1 ComponentNameConstructor (com.sun.enterprise.tools.verifier.tests.ComponentNameConstructor)1