Package com.caucho.jsp

Examples of com.caucho.jsp.Taglib


    throws JspParseException
  {
    if (log.isLoggable(Level.FINEST))
      log.finest("taglib prefix=" + prefix + " uri:" + uri);

    Taglib taglib;

    try {
      taglib = _tagManager.addTaglib(prefix, uri);
    } catch (JspParseException e) {
      if (isOptional) {
        log.log(Level.FINE, e.toString(), e);
        return null;
      }

      throw e;
    }

    if (taglib == null && isOptional &&
        ! uri.startsWith("urn:jsptld:") && ! uri.startsWith("urn:jsptagdir:"))
      return null;

    if (taglib == null) {
      throw error(L.l("'{0}' has no matching taglib-uri.  Taglibs specified with an absolute URI must either be:\n"
                      + "1) specified in the web.xml\n"
                      + "2) defined in a jar's .tld in META-INF\n"
                      + "3) defined in a .tld in WEB-INF\n"
                      + "4) predefined by Resin",
                      uri));
    }

    taglib = addLibrary(taglib);
    ArrayList<TldFunction> functions = taglib.getFunctionList();

    for (int i = 0; i < functions.size(); i++) {
      TldFunction function = functions.get(i);

      String name = taglib.getPrefixString() + ":" + function.getName();

      _elFunctionMap.put(name, function.getMethod());
    }

    return taglib;
View Full Code Here


  private Taglib addLibrary(Taglib taglib)
    throws JspParseException
  {
    for (int i = 0; i < _tagLibraryList.size(); i++) {
      Taglib oldTaglib = _tagLibraryList.get(i);

      if (oldTaglib.getURI().equals(taglib.getURI()))
        return oldTaglib;
    }

    /*
    // taglib = taglib.copy();
View Full Code Here

   * Adds a taglib.
   */
  public void addTaglibDir(String prefix, String tagdir)
    throws JspParseException
  {
    Taglib taglib = _tagManager.addTaglibDir(prefix, tagdir);

    ArrayList<TldFunction> functions = taglib.getFunctionList();

    for (int i = 0; i < functions.size(); i++) {
      TldFunction function = functions.get(i);

      String name = taglib.getPrefixString() + ":" + function.getName();

      _elFunctionMap.put(name, function.getMethod());
    }
  }
View Full Code Here

   */
  public void validate()
    throws Exception
  {
    for (int i = 0; i < _tagLibraryList.size(); i++) {
      Taglib taglib = _tagLibraryList.get(i);
      TagLibraryValidator validator = taglib.getValidator();

      if (validator != null) {
        ValidationMessage []messages;

        messages = validator.validate(taglib.getPrefixString(),
                                      taglib.getURI(),
                                      getPageData());

        if (messages != null && messages.length > 0) {
          StringBuilder message = new StringBuilder();
          for (int j = 0; j < messages.length; j++) {
View Full Code Here

TOP

Related Classes of com.caucho.jsp.Taglib

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.