bundles/org.apache.jasper.glassfish/src/org/apache/jasper/runtime/TldScanner.java
private void processTldsInFileSystem(String startPath)
            throws JasperException {

        Set dirList = ctxt.getResourcePaths(startPath);
        if (dirList != null) {
            Iterator it = dirList.iterator();
            while (it.hasNext()) {
                String path = (String) it.next();
                if (path.endsWith("/")) {
                    processTldsInFileSystem(path);
                }
                if (!path.endsWith(".tld")) {
                    continue;
                }
                if (path.startsWith("/WEB-INF/tags/")
                        && !path.endsWith("implicit.tld")) {
                    throw new JasperException(
                        Localizer.getMessage(
                                "jsp.error.tldinit.tldInWebInfTags",
                                path));
                }
                InputStream stream = ctxt.getResourceAsStream(path);
                TldInfo tldInfo = scanTld(path, null, stream);
                // Add listeners or to map tldlocations for this TLD
                if (scanListeners) {
                    addListener(tldInfo, true);
                }
                mapTldLocation(path, tldInfo, true);
            }
        }
    }
private void processTldsInFileSystem(String startPath)
            throws JasperException {

        Set dirList = ctxt.getResourcePaths(startPath);
        if (dirList != null) {
            Iterator it = dirList.iterator();
            while (it.hasNext()) {
                String path = (String) it.next();
                if (path.endsWith("/")) {
                    processTldsInFileSystem(path);
                }
                if (!path.endsWith(".tld")) {
                    continue;
                }
                if (path.startsWith("/WEB-INF/tags/")
                        && !path.endsWith("implicit.tld")) {
                    throw new JasperException(
                        Localizer.getMessage(
                                "jsp.error.tldinit.tldInWebInfTags",
                                path));
                }
                InputStream stream = ctxt.getResourceAsStream(path);
                TldInfo tldInfo = scanTld(path, null, stream);
                // Add listeners or to map tldlocations for this TLD
                if (scanListeners) {
                    addListener(tldInfo, true);
                }
                mapTldLocation(path, tldInfo, true);
            }
        }
    }
private void processTldsInFileSystem ( String startPath ) throws JasperException { Set dirList = ctxt . getResourcePaths ( startPath ) ; if ( dirList != null ) { Iterator it = dirList . iterator ( ) ; while ( it . hasNext ( ) ) { String path = ( String ) it . next ( ) ; if ( path . endsWith ( "/" ) ) { processTldsInFileSystem ( path ) ; } if ( ! path . endsWith ( ".tld" ) ) { continue ; } if ( path . startsWith ( "/WEB-INF/tags/" ) && ! path . endsWith ( "implicit.tld" ) ) { throw new JasperException ( Localizer . getMessage ( "jsp.error.tldinit.tldInWebInfTags" , path ) ) ; } InputStream stream = ctxt . getResourceAsStream ( path ) ; TldInfo tldInfo = scanTld ( path , null , stream ) ; // Add listeners or to map tldlocations for this TLD if ( scanListeners ) { addListener ( tldInfo , true ) ; } mapTldLocation ( path , tldInfo , true ) ; } } }
/*
Searches the filesystem under /WEB-INF for any TLD files, and scans
them for <uri> and <listener> elements.
/ * Searches the filesystem under / WEB - INF for any TLD files and scans them for <uri > and <listener > elements .