Examples of TldTaglib


Examples of com.caucho.jsp.cfg.TldTaglib

  TldTaglib parseTld(String uri, String mapLocation, String location)
    throws JspParseException, IOException
  {
    init();

    TldTaglib taglib = null;
    TldTaglib jsfTaglib = null;

    for (int i = 0; i < _preloadTaglibs.size(); i++) {
      TldPreload preload = _preloadTaglibs.get(i);

      if (uri.equals(preload.getURI())
View Full Code Here

Examples of com.caucho.jsp.cfg.TldTaglib

  TldTaglib parseTld(String location)
    throws JspParseException, IOException
  {
    init();

    TldTaglib tld = findTld(location);

    /* XXX: jsp/18n0 handled on init
    if (tld != null) {
      try {
        tld.init(_webApp);
View Full Code Here

Examples of com.caucho.jsp.cfg.TldTaglib

   */
  private TldTaglib parseTld(Path path)
    throws JspParseException, IOException
  {
    SoftReference<TldTaglib> taglibRef = _tldMap.get(path);
    TldTaglib taglib;

    if (taglibRef != null) {
      taglib = taglibRef.get();

      if (taglib != null && ! taglib.isModified())
        return taglib;
    }

    ReadStream is = path.openRead();

    try {
      taglib = parseTld(is);

      if (path instanceof JarPath)
        taglib.setJarPath(path.lookup("/"));

      _tldMap.put(path, new SoftReference<TldTaglib>(taglib));

      return taglib;
    } finally {
View Full Code Here

Examples of com.caucho.jsp.cfg.TldTaglib

   * @param is the input stream to the taglib
   */
  private TldTaglib parseTld(InputStream is)
    throws JspParseException, IOException
  {
    TldTaglib taglib = new TldTaglib();

    if (is instanceof ReadStream) {
      Path path = ((ReadStream) is).getPath();

      path.setUserPath(path.getURL());
    }

    String schema = null;

    if (_webApp.getJsp() == null
        || _webApp.getJsp().isValidateTaglibSchema()) {
      schema = getSchema();
    }

    try {
      Config config = new Config();
      config.setEL(false);
      config.configure(taglib, is, schema);
    } catch (ConfigException e) {
      log.warning(e.toString());
      log.log(Level.FINER, e.toString(), e);

      taglib.setConfigException(e);
    } catch (Exception e) {
      log.warning(e.toString());
      log.log(Level.FINER, e.toString(), e);

      taglib.setConfigException(e);
    } finally {
      is.close();
    }

    /* XXX: jsp/18n0 handled on init
View Full Code Here

Examples of com.caucho.jsp.cfg.TldTaglib

    Taglib taglib = _taglibDirMap.get(dir);

    if (taglib != null)
      return taglib;

    TldTaglib tldTaglib = new TldTaglib();
   
    taglib = new Taglib(prefix, "urn:jsptagdir:" + dir,
                        tldTaglib,
                        _tagFileManager);
View Full Code Here

Examples of com.caucho.jsp.cfg.TldTaglib

   */
  private Taglib readTaglib(String prefix, String uri, String location)
    throws JspParseException
  {
    try {
      TldTaglib tldTaglib = _tldMap.get(uri);

      if (tldTaglib != null) {
      }
      else {
        String mapLocation = _uriLocationMap.get(uri);

        if ((location == null || location.equals("")) &&
            (mapLocation == null || mapLocation.equals("")))
          return null;

        tldTaglib = _tldManager.parseTld(uri, mapLocation, location);

        _tldMap.put(uri, tldTaglib);
      }

      if (tldTaglib != null) {
        if (tldTaglib.getConfigException() != null)
          throw JspParseException.create(tldTaglib.getConfigException());

        return new Taglib(prefix, uri, tldTaglib, _tagFileManager);
      }
      else
        return null;
View Full Code Here

Examples of com.caucho.jsp.cfg.TldTaglib

    Taglib taglib = _taglibDirMap.get(dir);

    if (taglib != null)
      return taglib;

    TldTaglib tldTaglib = new TldTaglib();
   
    taglib = new Taglib(prefix, "urn:jsptagdir:" + dir,
      tldTaglib,
      _tagFileManager);
View Full Code Here

Examples of com.caucho.jsp.cfg.TldTaglib

   */
  private Taglib readTaglib(String prefix, String uri, String location)
    throws JspParseException
  {
    try {
      TldTaglib tldTaglib = _tldMap.get(uri);

      if (tldTaglib != null) {
      }
      else {
  String mapLocation = _uriLocationMap.get(uri);

  if ((location == null || location.equals("")) &&
      (mapLocation == null || mapLocation.equals("")))
    return null;

        tldTaglib = _tldManager.parseTld(uri, mapLocation, location);

        _tldMap.put(uri, tldTaglib);
      }

      if (tldTaglib != null) {
  if (tldTaglib.getConfigException() != null)
    throw JspParseException.create(tldTaglib.getConfigException());
 
  return new Taglib(prefix, uri, tldTaglib, _tagFileManager);
      }
      else
  return null;
View Full Code Here

Examples of org.apache.openejb.jee.TldTaglib

        urls = scanClassLoaderForTagLibs(parentClassLoader);
        tldLocations.addAll(urls);

        // load the tld files
        for (URL location : tldLocations) {
            TldTaglib taglib = ReadDescriptors.readTldTaglib(location);
            webModule.getTaglibs().add(taglib);
            if ("file".equals(location.getProtocol())) {
                webModule.getWatchedResources().add(URLs.toFilePath(location));
            }
        }
View Full Code Here

Examples of org.apache.openejb.jee.TldTaglib

        }
        return webApp;
    }

    public static TldTaglib readTldTaglib(URL url) throws OpenEJBException {
        TldTaglib tldTaglib;
        try {
            tldTaglib = (TldTaglib) JaxbJavaee.unmarshal(TldTaglib.class, url.openStream());
        } catch (SAXException e) {
            throw new OpenEJBException("Cannot parse the JSP tag library definition file: " + url.toExternalForm(), e);
        } catch (JAXBException e) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.