Package javax.naming.directory

Examples of javax.naming.directory.DirContext.list()


            assertTrue("WEB-INF entry is a DirContext",
                   webInfEntry instanceof DirContext);
            DirContext webInfContext = (DirContext) webInfEntry;

            // Check the contents of the WEB-INF context directly
            checkList(webInfContext.list(""), webInfNames);

        } catch (NamingException e) {
            fail("NamingException: " + e);
        }
View Full Code Here


            log.trace("  Scanning TLDs in /WEB-INF subdirectory");
        }
        DirContext resources = context.getResources();
        if( resources!=null ) {
            try {
                NamingEnumeration items = resources.list("/WEB-INF");
                while (items.hasMoreElements()) {
                    NameClassPair item = (NameClassPair) items.nextElement();
                    String resourcePath = "/WEB-INF/" + item.getName();
                    // FIXME - JSP 2.0 is not explicit about whether we should
                    // scan subdirectories of /WEB-INF for TLDs also
View Full Code Here

        // Scan JARs in the /WEB-INF/lib subdirectory of the web application
        if (log.isTraceEnabled()) {
            log.trace("  Scanning JARs in /WEB-INF/lib subdirectory");
        }
        try {
            NamingEnumeration items = resources.list("/WEB-INF/lib");
            while (items.hasMoreElements()) {
                NameClassPair item = (NameClassPair) items.nextElement();
                String resourcePath = "/WEB-INF/lib/" + item.getName();
                if (!resourcePath.endsWith(".jar")) {
                    continue;
View Full Code Here

            log.trace("  Scanning TLDs in /WEB-INF subdirectory");
        }
        DirContext resources = context.getResources();
        if( resources!=null ) {
            try {
                NamingEnumeration items = resources.list("/WEB-INF");
                while (items.hasMoreElements()) {
                    NameClassPair item = (NameClassPair) items.nextElement();
                    String resourcePath = "/WEB-INF/" + item.getName();
                    // FIXME - JSP 2.0 is not explicit about whether we should
                    // scan subdirectories of /WEB-INF for TLDs also
View Full Code Here

        // Scan JARs in the /WEB-INF/lib subdirectory of the web application
        if (log.isTraceEnabled()) {
            log.trace("  Scanning JARs in /WEB-INF/lib subdirectory");
        }
        try {
            NamingEnumeration items = resources.list("/WEB-INF/lib");
            while (items.hasMoreElements()) {
                NameClassPair item = (NameClassPair) items.nextElement();
                String resourcePath = "/WEB-INF/lib/" + item.getName();
                if (!resourcePath.endsWith(".jar")) {
                    continue;
View Full Code Here

            }

            // Looking up directory /WEB-INF/lib in the context
            NamingEnumeration<NameClassPair> enumeration = null;
            try {
                enumeration = libDir.list("");
            } catch (NamingException e) {
                IOException ioe = new IOException(sm.getString(
                        "webappLoader.namingFailure", libPath));
                ioe.initCause(e);
                throw ioe;
View Full Code Here

            }

            // Looking up directory /WEB-INF/lib in the context
            NamingEnumeration<NameClassPair> enumeration = null;
            try {
                enumeration = libDir.list("");
            } catch (NamingException e) {
                IOException ioe = new IOException(sm.getString(
                        "webappLoader.namingFailure", libPath));
                ioe.initCause(e);
                throw ioe;
View Full Code Here

            assertTrue("WEB-INF entry is a DirContext",
                   webInfEntry instanceof DirContext);
            DirContext webInfContext = (DirContext) webInfEntry;

            // Check the contents of the WEB-INF context directly
            checkList(webInfContext.list(""), webInfNames);

        } catch (NamingException e) {
            fail("NamingException: " + e);
        }
View Full Code Here

        env.put(Context.SECURITY_CREDENTIALS, CREDENTIALS);
        DirContext ctx = new InitialDirContext(env);

        HashSet set = new HashSet();

        NamingEnumeration list = ctx.list("ou=system");

        while (list.hasMore()) {
            NameClassPair ncp = (NameClassPair) list.next();
            set.add(ncp.getName());
        }
View Full Code Here

            assertTrue("WEB-INF entry is a DirContext",
                   webInfEntry instanceof DirContext);
            DirContext webInfContext = (DirContext) webInfEntry;

            // Check the contents of the WEB-INF context directly
            checkList(webInfContext.list(""), webInfNames);

        } catch (NamingException e) {
            fail("NamingException: " + 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.