Previous | Next | Trail Map | The Basics | Contents

Directory Operations

You can use the JNDI to perform directory operations. These include: Each of these operations is described in this lesson. Before using any of these operations, you should read a discussion on the use of attribute names that apply to all.

Configuration

The examples in this lesson use the LDAP service provider. They assume that you have set up a sample namespace using the content described in the Preparations (in the Basics trail) lesson. If you use another service provider or choose to use another part of the LDAP namespace, the behavior will be different from what is shown here.

The initial context used in these examples is initialized using the following environment properties:

// Set up environment for creating initial context
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY, 
    "com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://localhost:389/o=JNDITutorial");


Previous | Next | Trail Map | The Basics | Contents