Package javax.servlet.jsp

Examples of javax.servlet.jsp.JspTagException


  }
  else if (bodyContent != null) {
      sqlStatement = bodyContent.getString();
  }
  if (sqlStatement == null || sqlStatement.trim().length() == 0) {
      throw new JspTagException(
                Resources.getMessage("SQL_NO_STATEMENT"));
  }

  int result = 0;
  try {
View Full Code Here


  TransactionTagSupport parent = (TransactionTagSupport)
      findAncestorWithClass(this, TransactionTagSupport.class);
  if (parent != null) {
            if (dataSourceSpecified) {
                throw new JspTagException(
                    Resources.getMessage("ERROR_NESTED_DATASOURCE"));
            }
      conn = parent.getSharedConnection();
            isPartOfTransaction = true;
  } else {
View Full Code Here

    public int doEndTag() throws JspException {
  SQLExecutionTag parent = (SQLExecutionTag)
      findAncestorWithClass(this, SQLExecutionTag.class);
  if (parent == null) {
      throw new JspTagException(
                Resources.getMessage("SQL_PARAM_OUTSIDE_PARENT"));
  }

  Object paramValue = null;
  if (value != null) {
View Full Code Here

      pageContext.setAttribute(var, result, scope);
  else {
      try {
          pageContext.getOut().print(result);
      } catch (java.io.IOException ex) {
    throw new JspTagException(ex.toString(), ex);
      }
  }

  return EVAL_PAGE;
    }
View Full Code Here

    return (request.getContextPath() + url);
      else
    return url;
  } else {
            if (!context.startsWith("/") || !url.startsWith("/")) {
                throw new JspTagException(
                    Resources.getMessage("IMPORT_BAD_RELATIVE"));
            }
            if (context.equals("/")) {
                // Don't produce string starting with '//', many
                // browsers interpret this as host name, not as
View Full Code Here

  }
  else if (bodyContent != null) {
      sqlStatement = bodyContent.getString();
  }
  if (sqlStatement == null || sqlStatement.trim().length() == 0) {
      throw new JspTagException(
                Resources.getMessage("SQL_NO_STATEMENT"));
  }
        /*
         * We shouldn't have a negative startRow or illegal maxrows
         */
 
View Full Code Here

  TransactionTagSupport parent = (TransactionTagSupport)
      findAncestorWithClass(this, TransactionTagSupport.class);
  if (parent != null) {
            if (dataSourceSpecified) {
                throw new JspTagException(
                    Resources.getMessage("ERROR_NESTED_DATASOURCE"));
            }
      conn = parent.getSharedConnection();
            isPartOfTransaction = true;
  } else {
View Full Code Here

                if (driverClassName != null) {
                    dsw.setDriverClassName(driverClassName);
                }
            }
            catch (Exception e) {
                throw new JspTagException(
                    Resources.getMessage("DRIVER_INVALID_CLASS",
           e.toString()), e);
            }
            dsw.setJdbcURL(jdbcURL);
            dsw.setUserName(userName);
View Full Code Here

  try {
      conn = dataSource.getConnection();
      origIsolation = conn.getTransactionIsolation();
      if (origIsolation == Connection.TRANSACTION_NONE) {
    throw new JspTagException(
                    Resources.getMessage("TRANSACTION_NO_SUPPORT"));
      }
      if ((isolation != Connection.TRANSACTION_NONE)
        && (isolation != origIsolation)) {
    conn.setTransactionIsolation(isolation);
      }
      conn.setAutoCommit(false);
  } catch (SQLException e) {
      throw new JspTagException(
                Resources.getMessage("ERROR_GET_CONNECTION",
             e.toString()), e);
  }

  return EVAL_BODY_INCLUDE;
View Full Code Here

     */
    public int doEndTag() throws JspException {
  try {
      conn.commit();
  } catch (SQLException e) {
      throw new JspTagException(
                Resources.getMessage("TRANSACTION_COMMIT_ERROR",
             e.toString()), e);
  }
  return EVAL_PAGE;
    }
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.