Package org.apache.jasper.compiler

Examples of org.apache.jasper.compiler.TldLocation


     * second element denotes the name of the TLD entry in the jar file.
     * Returns null if the given uri is not associated with any tag library
     * 'exposed' in the web application.
     */
    public TldLocation getTldLocation(String uri) throws JasperException {
        TldLocation location =
            getOptions().getTldLocationsCache().getLocation(uri);
        return location;
    }
View Full Code Here


                // Save this location if appropriate
                if (tagLoc == null)
                    continue;
                if (uriType(tagLoc) == NOROOT_REL_URI)
                    tagLoc = "/WEB-INF/" + tagLoc;
                TldLocation location;
                if (tagLoc.endsWith(JAR_EXT)) {
                    location = new TldLocation("META-INF/taglib.tld", ctxt.getResource(tagLoc).toString());
                } else {
                    location = new TldLocation(tagLoc);
                }
                mappings.put(tagUri, location);
            }
        } finally {
            if (webXml != null) {
View Full Code Here

                    if (path.startsWith("/WEB-INF/tags/") &&
                            !path.endsWith("implicit.tld")) {
                        continue;
                    }
                    InputStream stream = ctxt.getResourceAsStream(path);
                    tldScanStream(stream, new TldLocation(path));
                } else {
                    tldScanResourcePaths(path);
                }
            }
        }
View Full Code Here

               
        BundleResourceFinder resourceFinder = new BundleResourceFinder(packageAdmin, bundle, "META-INF/", ".tld");
        resourceFinder.find(new ResourceFinderCallback() {

            public boolean foundInDirectory(Bundle bundle, String basePath, URL url) throws Exception {
                tldScanStream(url, new TldLocation(url.getPath()));
                return true;
            }

            public boolean foundInJar(Bundle bundle, String jarName, ZipEntry entry, InputStream in) throws Exception {
                URL jarURL = bundle.getEntry(jarName);
                tldScanStream(in, new TldLocation(entry.getName(), jarURL.toExternalForm()));
                return true;
            }
           
        });
         
View Full Code Here

        if (reference != null) {
            TldRegistry tldRegistry = (TldRegistry) bundleContext.getService(reference);
            for (TldProvider.TldEntry entry : tldRegistry.getDependentTlds(bundle)) {
                URL url = entry.getURL();
                if (entry.getJarUrl() != null) {
                    tldScanStream(url, new TldLocation(entry.getName(), entry.getJarUrl().toExternalForm()));
                } else {
                    tldScanStream(url, new TldLocation(entry.getName(), new BundleJarResource(entry.getBundle())));
                }
            }
            bundleContext.ungetService(reference);           
        }
    }
View Full Code Here

                // Save this location if appropriate
                if (tagLoc == null)
                    continue;
                if (uriType(tagLoc) == NOROOT_REL_URI)
                    tagLoc = "/WEB-INF/" + tagLoc;
                TldLocation location;
                if (tagLoc.endsWith(JAR_EXT)) {
                    location = new TldLocation("META-INF/taglib.tld", ctxt.getResource(tagLoc).toString());
                } else {
                    location = new TldLocation(tagLoc);
                }
                mappings.put(tagUri, location);
            }
        } finally {
            if (webXml != null) {
View Full Code Here

                    if (path.startsWith("/WEB-INF/tags/") &&
                            !path.endsWith("implicit.tld")) {
                        continue;
                    }
                    InputStream stream = ctxt.getResourceAsStream(path);
                    tldScanStream(stream, new TldLocation(path));
                } else {
                    tldScanResourcePaths(path);
                }
            }
        }
View Full Code Here

               
        BundleResourceFinder resourceFinder = new BundleResourceFinder(packageAdmin, bundle, "META-INF/", ".tld");
        resourceFinder.find(new ResourceFinderCallback() {

            public boolean foundInDirectory(Bundle bundle, String basePath, URL url) throws Exception {
                tldScanStream(url, new TldLocation(url.getPath()));
                return true;
            }

            public boolean foundInJar(Bundle bundle, String jarName, ZipEntry entry, InputStream in) throws Exception {
                URL jarURL = bundle.getEntry(jarName);
                tldScanStream(in, new TldLocation(entry.getName(), jarURL.toExternalForm()));
                return true;
            }
           
        });
         
View Full Code Here

        if (reference != null) {
            TldRegistry tldRegistry = (TldRegistry) bundleContext.getService(reference);
            for (TldProvider.TldEntry entry : tldRegistry.getDependentTlds(bundle)) {
                URL url = entry.getURL();
                if (entry.getJarUrl() != null) {
                    tldScanStream(url, new TldLocation(entry.getName(), entry.getJarUrl().toExternalForm()));
                } else if (entry.getFileUrl() != null){
                   tldScanStream(url, new TldLocation(entry.getName(), new UnpackedJarResource(entry.getFileUrl())));
                } else {
                    tldScanStream(url, new TldLocation(entry.getName(), new BundleJarResource(entry.getBundle())));
                }
            }
            bundleContext.ungetService(reference);           
        }
    }
View Full Code Here

     * second element denotes the name of the TLD entry in the jar file.
     * Returns null if the given uri is not associated with any tag library
     * 'exposed' in the web application.
     */
    public TldLocation getTldLocation(String uri) {
        TldLocation location =
                getOptions().getTldLocationsCache().getLocation(uri);
        return location;
    }
View Full Code Here

TOP

Related Classes of org.apache.jasper.compiler.TldLocation

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.