protected void parseTld(String resourcePath) throws IOException, SAXException { TldResourcePath tldResourcePath = new TldResourcePath(context.getResource(resourcePath), resourcePath); parseTld(tldResourcePath); }
private void parseTld(String resourcePath) throws IOException, SAXException { TldResourcePath tldResourcePath = new TldResourcePath(context.getResource(resourcePath), resourcePath); parseTld(tldResourcePath); }
@Override public void scanJars() { for (URL url : preScannedURLs){ String str = url.toExternalForm(); int a = str.indexOf("jar:"); int b = str.indexOf("!/"); if (a >= 0 && b> 0) { String fileUrl = str.substring(a + 4, b); String path = str.substring(b + 2); try { parseTld(new TldResourcePath(new URL(fileUrl), null, path)); } catch (Exception e) { throw new IllegalStateException(e); } } else { throw new IllegalStateException("Bad tld url: "+str); } } } }
TldResourcePath path = new TldResourcePath(url, resourcePath); parseTld(path); tldFound = true;
@Override public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException { if (!file.getFileName().toString() .toLowerCase(Locale.ENGLISH).endsWith(TLD_EXT)) { return FileVisitResult.CONTINUE; } String subPath = file.subpath( filePath.getNameCount(), file.getNameCount()).toString(); if ('/' != File.separatorChar) { subPath = subPath.replace(File.separatorChar, '/'); } String resourcePath = webappPath + "/" + subPath; try { URL url = file.toUri().toURL(); TldResourcePath path = new TldResourcePath(url, resourcePath); parseTld(path); tldFound = true; } catch (SAXException e) { throw new IOException(e); } return FileVisitResult.CONTINUE; } });
try parseTld(new TldResourcePath(new URL(fileUrl), null, path)); parseTld(new TldResourcePath(url, null, null));
TldResourcePath path = new TldResourcePath(url, resourcePath); parseTld(path); } catch (SAXException e) {
err.jspError("jsp.error.tld.missing_jar", uri); return new TldResourcePath(url, uri, "META-INF/taglib.tld"); } else if (uri.startsWith("/WEB-INF/lib/") || uri.startsWith("/WEB-INF/classes/") || (uri.startsWith("/WEB-INF/tags/") && uri.endsWith(".tld")&& !uri.endsWith("implicit.tld"))) { err.jspError("jsp.error.tld.invalid_tld_file", uri); return new TldResourcePath(url, uri);
err.jspError("jsp.error.tld.missing_jar", uri); return new TldResourcePath(url, uri, "META-INF/taglib.tld"); } else { return new TldResourcePath(url, uri);
TldResourcePath path = new TldResourcePath(url, resourcePath); parseTld(path); } catch (SAXException e) {
try { URL url = ctxt.getResource(path); TldResourcePath resourcePath = new TldResourcePath(url, path); ServletContext servletContext = ctxt.getServletContext(); boolean validate = Boolean.parseBoolean(
try { URL url = ctxt.getResource(path); TldResourcePath resourcePath = new TldResourcePath(url, path); ServletContext servletContext = ctxt.getServletContext(); boolean validate = Boolean.parseBoolean(
tldResourcePath = new TldResourcePath(url, resourcePath, "META-INF/taglib.tld"); } else { tldResourcePath = new TldResourcePath(url, resourcePath);
tldResourcePath = new TldResourcePath(url, resourcePath, "META-INF/taglib.tld"); } else { tldResourcePath = new TldResourcePath(url, resourcePath);
new TldResourcePath(jarFileUrl, webappPath, entryName); try { parseTld(tldResourcePath);
new TldResourcePath(jarURL, webappPath, entryName); try { parseTld(tldResourcePath);
final TldResourcePath path = new TldResourcePath(MYFACES_URL, null, "META-INF/myfaces_html.tld"); URI_TLD_RESOURCE.put("http://java.sun.com/jsf/html", path); final TaglibXml taglibXml = new TaglibXml(); final TldResourcePath path = new TldResourcePath(MYFACES_URL, null, "META-INF/myfaces_core.tld"); URI_TLD_RESOURCE.put("http://java.sun.com/jsf/core", path); final TaglibXml taglibXml = new TaglibXml(); final TldResourcePath path = new TldResourcePath(JSTL_URL, null, "META-INF/fmt.tld"); URI_TLD_RESOURCE.put("http://java.sun.com/jsp/jstl/fmt", path); final TaglibXml taglibXml = new TaglibXml(); final TldResourcePath path = new TldResourcePath(JSTL_URL, null, "META-INF/fmt-1_0.tld"); URI_TLD_RESOURCE.put("http://java.sun.com/jstl/fmt", path); final TaglibXml taglibXml = new TaglibXml(); final TldResourcePath path = new TldResourcePath(JSTL_URL, null, "META-INF/sql.tld"); URI_TLD_RESOURCE.put("http://java.sun.com/jsp/jstl/sql", path); final TaglibXml taglibXml = new TaglibXml(); final TldResourcePath path = new TldResourcePath(JSTL_URL, null, "META-INF/x-1_0.tld"); URI_TLD_RESOURCE.put("http://java.sun.com/jstl/xml", path); final TaglibXml taglibXml = new TaglibXml(); final TldResourcePath path = new TldResourcePath(JSTL_URL, null, "META-INF/sql-1_0-rt.tld"); URI_TLD_RESOURCE.put("http://java.sun.com/jstl/sql_rt", path); final TaglibXml taglibXml = new TaglibXml(); final TldResourcePath path = new TldResourcePath(JSTL_URL, null, "META-INF/sql-1_0.tld");