Package javax.servlet.jsp

Examples of javax.servlet.jsp.JspException


    if (value != null && !value.trim().equals("")) { //$NON-NLS-1$
      try {
        result = evalStringAttr(Constants.ALIGN, value);
        removeAttr(key);
      } catch (Exception e) {
        throw new JspException("Unable to evaluate " + key //$NON-NLS-1$
            + " attribute", e); //$NON-NLS-1$
      }
    }

    return result;
View Full Code Here


      String attrExprValue = entry.getValue();
      if (!attrExprValue.equals(Constants.NULL_VALUE)) {
        try {
          attrValue = evalStringAttr(attrName, attrExprValue);
        } catch (Exception e) {
          throw new JspException(" Evaluation attribute failed " //$NON-NLS-1$
              + e.getMessage(), e);
        }
        String encodeValue = HTMLEncoder.encode(attrValue);

        tagAttrs.append(HTMLHelpers
View Full Code Here

    if (this._valueCollection == null) {
      try {
        this._valueArray = evalArrayAttr(Constants.VALUE, valueExpr);
      } catch (Exception e) {
        throw new JspException(
            " Evaluation attribute failed, Collection or Object[] expected " + e.getMessage(), e); //$NON-NLS-1$
      }
    }
  }
View Full Code Here

    if (this._displayValueCollection == null) {
      try {
        this._displayValueArray = evalArrayAttr(
            Constants.DISPLAY_VALUE, this._displayExpr);
      } catch (Exception e) {
        throw new JspException(
            " Evaluation attribute failed, Collection or Object[] expected " + e.getMessage(), e); //$NON-NLS-1$
      }
    }
  }
View Full Code Here

      try {
        // checkval = evalStringAttr(Constants.SELECTED, selectExpr);
        this._selectedString = evalStringAttr(Constants.SELECTED,
            selectExpr);
      } catch (Exception e) {
        throw new JspException(
            " Evaluation attribute failed " + e.getMessage(), e); //$NON-NLS-1$
      }
    }
  }
View Full Code Here

    try {
      if (Constants.TRUE.equals(evalStringAttr(Constants.XHTML, xhtml))) {
        this.pageContext.setAttribute(Constants.XHTML_KEY, Constants.TRUE);
      }
    } catch (Exception e) {
      throw new JspException(" Evaluation of xhtml attribute failed " //$NON-NLS-1$
          + e.getMessage(), e);
    }
  }
View Full Code Here

      addElement(bundle, locale, buffer, Globals.ERRORS_FOOTER, true);

      try {
         this.pageContext.getOut().write(buffer.toString());
      } catch (IOException e) {
         throw new JspException("Unable to write errors to page", e); //$NON-NLS-1$
      }

      return EVAL_BODY_INCLUDE;
   }
View Full Code Here

                              String var, String scope, Object value)
    throws JspException
  {
    if (var == null) {
      if (scope != null && ! "".equals(scope))
        throw new JspException(L.l("var must not be null when scope '{0}' is set.",
                                   scope));
    }
    else if ("".equals(var)) {
      throw new JspException(L.l("var must not be ''"));
    }
    else if (scope == null || scope.equals("page")) {
      if (value != null)
        pageContext.setAttribute(var, value);
      else
        pageContext.removeAttribute(var);
    }
    else if (scope.equals("request")) {
      if (value != null)
        pageContext.getRequest().setAttribute(var, value);
      else
        pageContext.getRequest().removeAttribute(var);
    }
    else if (scope.equals("session")) {
      if (value != null)
        pageContext.getSession().setAttribute(var, value);
      else
        pageContext.getSession().removeAttribute(var);
    }
    else if (scope.equals("application")) {
      if (value != null)
        pageContext.getServletContext().setAttribute(var, value);
      else
        pageContext.getServletContext().removeAttribute(var);
    }
    else
      throw new JspException(L.l("illegal scope value {0}", scope));
  }
View Full Code Here

      transformer.transform(source, result);

      if (_var != null)
        CoreSetTag.setValue(pageContext, _var, _scope, top);
    } catch (Exception e) {
      throw new JspException(e);
    }

    return SKIP_BODY;
  }
View Full Code Here

      source = new DOMSource(((NodeList) xmlObj).item(0), systemId);
    }
    else if (xmlObj instanceof Source)
      source = (Source) xmlObj;
    else
      throw new JspException(L.l("unknown xml object type `{0}'", xmlObj));
   
    return source;
  }
View Full Code Here

TOP

Related Classes of javax.servlet.jsp.JspException

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.