Java > LDAP > How to Query default attributes of LDAP Entry
How to Query default attributes of LDAP Entry
LDAP (Lightweight Directory Access Protocol) is based on X.500 standard.
Its a hierarchical data structure with Entries organized in a tree like structure
called Directory Information Tree (DIT).
The following example shows retrieving the default attributes of all entries having
objectclass as 'person'.
//Setup the environment to login as anonymous user
Hashtable<String, String> environment = new Hashtable<String, String>();
environment.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
environment.put(Context.PROVIDER_URL, "ldap://localhost:389/dc=test,dc=com");