Package javax.servlet.jsp

Examples of javax.servlet.jsp.JspTagException


     * Ensures the "end" property is sensible, throwing an exception
     * expected to propagate up if it isn't
     */
    protected void validateEnd() throws JspTagException {
        if (end < 0)
            throw new JspTagException("'end' < 0");
    }
View Full Code Here


     * Ensures the "step" property is sensible, throwing an exception
     * expected to propagate up if it isn't
     */
    protected void validateStep() throws JspTagException {
        if (step < 1)
            throw new JspTagException("'step' <= 0");
    }
View Full Code Here

      pageContext.setAttribute(var, parsed, scope)
  } else {
      try {
    pageContext.getOut().print(parsed);
      } catch (IOException ioe) {
    throw new JspTagException(ioe.toString(), ioe);
      }
  }

  return EVAL_PAGE;
    }
View Full Code Here

    public int doEndTag() throws JspException {
  if (bodyContent != null) {
      try {
    pageContext.getOut().print(bodyContent.getString());
      } catch (IOException ioe) {
    throw new JspTagException(ioe.toString(), ioe);
      }
  }

  return EVAL_PAGE;
    }
View Full Code Here

    public int doEndTag() throws JspException {
  try {
      pageContext.getOut().print(bodyContent.getString());
  } catch (IOException ioe) {
      throw new JspTagException(ioe.toString(), ioe);
  }

  return EVAL_PAGE;
    }
View Full Code Here

    }

    protected Object next() throws JspTagException {
  Object o = nodes.get(nodesIndex++);
  if (!(o instanceof org.w3c.dom.Node))
      throw new JspTagException(
    Resources.getMessage("FOREACH_NOT_NODESET"));
  current = (org.w3c.dom.Node) o;
        return current;
    }
View Full Code Here

    // simply send our name and value to our parent <transform> tag
    public int doEndTag() throws JspException {
  Tag t = findAncestorWithClass(this, TransformSupport.class);
  if (t == null)
      throw new JspTagException(
    Resources.getMessage("PARAM_OUTSIDE_TRANSFORM"));
  TransformSupport parent = (TransformSupport) t;

  Object value = this.value;
  if (value == null) {
View Full Code Here

            if (r == null)
                throw new NullAttributeException("if", "test");
      else
          return (((Boolean) r).booleanValue());
        } catch (JspException ex) {
      throw new JspTagException(ex.toString(), ex);
  }
    }
View Full Code Here

  // if we've gotten a filter, set up a transformer to support it
  if (filter != null) {
            if (tf == null)
                tf = TransformerFactory.newInstance();
            if (!tf.getFeature(SAXTransformerFactory.FEATURE))
                throw new JspTagException(
        Resources.getMessage("PARSE_NO_SAXTRANSFORMER"));
            SAXTransformerFactory stf = (SAXTransformerFactory) tf;
            th = stf.newTransformerHandler();
  }

  // produce a Document by parsing whatever the attributes tell us to use
  Document d;
  Object xmlText = this.xml;
  if (xmlText == null) {
      // if the attribute was specified, use the body as 'xml'
      if (bodyContent != null && bodyContent.getString() != null)
    xmlText = bodyContent.getString().trim();
      else
    xmlText = "";
  }
  if (xmlText instanceof String)
      d = parseStringWithFilter((String) xmlText, filter);
  else if (xmlText instanceof Reader)
      d = parseReaderWithFilter((Reader) xmlText, filter);
  else
      throw new JspTagException(
          Resources.getMessage("PARSE_INVALID_SOURCE"));

  // we've got a Document object; store it out as appropriate
  // (let any exclusivity or other constraints be enforced by TEI/TLV)
  if (var != null)
View Full Code Here

    // Private conversion methods to handle the various types we support

    // catch-all method whose invocation currently signals a 'matching error'
    protected ForEachIterator toForEachIterator(Object o)
            throws JspTagException {
        throw new JspTagException(Resources.getMessage("FOREACH_BAD_ITEMS"));
    }
View Full Code Here

TOP

Related Classes of javax.servlet.jsp.JspTagException

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.