Package org.apache.jasper

Examples of org.apache.jasper.JasperException


            throw new JasperException("ITE: " + ex); // FIXME
        } catch (NoSuchMethodException ex) {
            throw new JasperException("NSME: " + ex); // FIXME
            */
        } catch (ParserConfigurationException ex) {
            throw new JasperException
                (Constants.getString("jsp.error.parse.xml",
                                     new Object[]{uri, ex.getMessage()}));
        } catch (SAXParseException ex) {
            throw new JasperException
                (Constants.getString
                 ("jsp.error.parse.xml.line",
                  new Object[]{uri,
                               new Integer(ex.getLineNumber()),
                               new Integer(ex.getColumnNumber()),
                               ex.getMessage()}));
        } catch (SAXException sx) {
            throw new JasperException
                (Constants.getString("jsp.error.parse.xml",
                                     new Object[]{uri, sx.getMessage()}));
        } catch (IOException io) {
            throw new JasperException
                (Constants.getString("jsp.error.parse.xml",
                                     new Object[]{uri, io.toString()}));
        }

        // Convert the resulting document to a graph of TreeNodes
View Full Code Here


        }

        public void visit(Node.JspRoot n) throws JasperException {
            Attributes attrs = n.getAttributes();
            if (attrs == null) {
                throw new JasperException("Missing attributes in jsp:root");
            }
            int len = attrs.getLength();
            for (int i=0; i<len; i++) {
                String qName = attrs.getQName(i);
                if ((qName.startsWith("xmlns:jsp")
View Full Code Here

            if (jarFile != null) {
                try {
                    jarFile.close();
                } catch (Throwable t) {}
            }
            throw new JasperException(ex);
        }
    }
View Full Code Here

     * @param errMsg Parse error message
     * @param exception Parse exception
     */
    public void jspError(String fname, int line, int column, String errMsg,
                         Exception ex) throws JasperException {
        throw new JasperException(fname + "(" + line + "," + column + ")"
                                  + " " + errMsg, ex);
    }
View Full Code Here

     *
     * @param errMsg Parse error message
     * @param exception Parse exception
     */
    public void jspError(String errMsg, Exception ex) throws JasperException {
        throw new JasperException(errMsg, ex);
    }
View Full Code Here

            buf.append(err.getString("jsp.error.corresponding.servlet"));
            buf.append(details[i].getErrorMessage());
            buf.append('\n');
        }

        throw new JasperException(err.getString("jsp.error.unable.compile")
                                  + buf);
    }
View Full Code Here

            builder.setEntityResolver(entityResolver);
            builder.setErrorHandler(errorHandler);
            doc = builder.parse(in);
            return doc;
        } catch (ParserConfigurationException ex) {
            throw new JasperException(
                Constants.getString("jsp.error.parse.xml",
                                    new Object[]{uri, ex.getMessage()}));
        } catch (SAXParseException ex) {
            throw new JasperException(
                Constants.getString("jsp.error.parse.xml.line",
                                    new Object[]{uri,
                                                 new Integer(ex.getLineNumber()),
                                                 new Integer(ex.getColumnNumber()),
                                                 ex.getMessage()}));
        } catch (SAXException sx) {
            throw new JasperException(
                Constants.getString("jsp.error.parse.xml",
                                    new Object[]{uri, sx.getMessage()}));
        } catch (IOException io) {
            throw new JasperException(
                Constants.getString("jsp.error.parse.xml",
                                    new Object[]{uri, io.toString()}));
        }
    }
View Full Code Here

      } else {
    return getValueFromPropertyEditorManager(
                                            t, propertyName, s);
            }
        } catch (Exception ex) {
            throw new JasperException(ex);
        }
    }
View Full Code Here

    }
      }
      if ( method != null ) {
    if (type.isArray()) {
                    if (request == null) {
      throw new JasperException(
                Localizer.getMessage("jsp.error.beans.setproperty.noindexset"));
                    }
        Class t = type.getComponentType();
        String[] values = request.getParameterValues(param);
        //XXX Please check.
        if(values == null) return;
        if(t.equals(String.class)) {
      method.invoke(bean, new Object[] { values });
        } else {
      Object tmpval = null;
      createTypedArray (prop, bean, method, values, t,
            propertyEditorClass);
        }
    } else {
        if(value == null || (param != null && value.equals(""))) return;
        Object oval = convert(prop, value, type, propertyEditorClass);
        if ( oval != null )
      method.invoke(bean, new Object[] { oval });
    }
      }
  } catch (Exception ex) {
      throw new JasperException(ex);
  }
        if (!ignoreMethodNF && (method == null)) {
            if (type == null) {
    throw new JasperException(
                    Localizer.getMessage("jsp.error.beans.noproperty",
           prop,
           bean.getClass().getName()));
            } else {
    throw new JasperException(
              Localizer.getMessage("jsp.error.beans.nomethod.setproperty",
           prop,
           type.getName(),
           bean.getClass().getName()));
            }
View Full Code Here

                                            t, propertyName, values[i]);
    }
    method.invoke (bean, new Object[] {tmpval});
      }
  } catch (Exception ex) {
      throw new JasperException ("error in invoking method");
  }
    }
View Full Code Here

TOP

Related Classes of org.apache.jasper.JasperException

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.