Package javax.servlet.jsp

Examples of javax.servlet.jsp.JspTagException


        }
        if (httpRequest.getSession().getAttribute(NOT_PROCESS_PARAMETER)!=null) {
            try {
                getPreviousOut().print(oldBody);
            } catch (IOException e) {
                throw new JspTagException(e);
            }
            return SKIP_BODY;
        }
        try {
            CompressTagHandler compressor = new CompressTagHandler(id, method, options, basepath);
            RealRequestProxy runtimeRequest = new RealRequestProxy(httpRequest);
      String newBody = compressor.handleTag(runtimeRequest, runtimeRequest, oldBody);
            getPreviousOut().print(newBody);
        } catch (Exception e) {
            throw new JspTagException(e);
        }
        return SKIP_BODY;
    }
View Full Code Here


  Source s;
  if (xslt != null) {
      if (!(xslt instanceof String) && !(xslt instanceof Reader)
                    && !(xslt instanceof javax.xml.transform.Source))
    throw new JspTagException(
        Resources.getMessage("TRANSFORM_XSLT_UNRECOGNIZED"));
      s = getSource(xslt, xsltSystemId);
  } else {
      throw new JspTagException(
          Resources.getMessage("TRANSFORM_NO_TRANSFORMER"));
        }
  tf.setURIResolver(new JstlUriResolver(pageContext));
        t = tf.newTransformer(s);
View Full Code Here

        jstlPrefixResolver, xpathSupport, varVector);
       
        try {
            return result.bool();
        } catch (TransformerException ex) {
            throw new JspTagException(
                Resources.getMessage("XPATH_ERROR_XOBJECT", ex.toString()), ex);           
        }
    }
View Full Code Here

                }

                vector.add( resultObject );
                return new JSTLNodeList ( vector );
            } catch ( TransformerException te ) {
                throw new JspTagException(te.toString(), te);
            }
        }
         
       
      
View Full Code Here

                //p("&&&&Variable set to => " + variableValue.toString() );
                //p("&&&&Variable type => " + variableValue.getTypeString() );
                myvs.setGlobalVariable( i, variableValue );

            } catch ( TransformerException te ) {
                throw new JspTagException(te.toString(), te);
            }
        }
        return varVector;
    }
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

  }
  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

                buf.append(Array.get(obj, i).toString());
                if (i<count-1) buf.append("<font color='red'> &#149; </font>");
            }
            return buf.toString();
        } catch (IllegalArgumentException ex) {}
        throw new JspTagException("Bad Item");       
    }     
View Full Code Here

    @Override
    public int doEndTag() throws JspTagException {
        LocalDispatcher dispatcher = (LocalDispatcher) pageContext.getRequest().getAttribute("dispatcher");

        if (dispatcher == null)
            throw new JspTagException("Cannot get dispatcher from the request object.");

        GenericValue userLogin = (GenericValue) pageContext.getSession().getAttribute("userLogin");

        int scope = PageContext.PAGE_SCOPE;
        char scopeChar = resultScope.toUpperCase().charAt(0);

        switch (scopeChar) {
        case 'A':
            scope = PageContext.APPLICATION_SCOPE;
            break;

        case 'S':
            scope = PageContext.SESSION_SCOPE;
            break;

        case 'R':
            scope = PageContext.REQUEST_SCOPE;
            break;

        case 'P':
            scope = PageContext.PAGE_SCOPE;
            break;

        default:
            throw new JspTagException("Invaild result scope specified. (page, request, session, application)");
        }

        Map<String, Object> context = getInParameters();
        Map<String, Object> result = null;

        if (userLogin != null)
            context.put("userLogin", userLogin);
        try {
            if (mode.equalsIgnoreCase("async"))
                dispatcher.runAsync(serviceName, context);
            else
                result = dispatcher.runSync(serviceName, context);
        } catch (GenericServiceException e) {
            Debug.logError(e, module);
            throw new JspTagException("Problems invoking the requested service: " + e.getMessage());
        }

        Map<String, String> aliases = getOutParameters();

        if (result != null) {
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.