![]() ![]() ![]() ![]() |
Contents |
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.
- Reading attributes of an object
- Modifying attributes of an object
- Searching the directory
- Performing hybrid naming and directory operations
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 Preparationslesson. 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");
![]() ![]() ![]() ![]() |
Contents |