R
Ronen Diment
Hi!
I'm trying to connect to an active directory through LDAP , on java client.
I dont know the structure of the active directory so I dont know what
parameters I Should pass to getAttributes().
Do you know how to get the strcuture(List of all the elements) of the Active
Directory?
The code:
Hashtable env = new Hashtable(11);
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://ldap.public.com:389");
try { // Create the initial directory context
DirContext ctx = new InitialDirContext(env);
// Dont know the structure - What parameters to supply??
Attributes attrs = ctx.getAttributes("DC=myOrg,DC=int");
Thanks,
Ron
I'm trying to connect to an active directory through LDAP , on java client.
I dont know the structure of the active directory so I dont know what
parameters I Should pass to getAttributes().
Do you know how to get the strcuture(List of all the elements) of the Active
Directory?
The code:
Hashtable env = new Hashtable(11);
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://ldap.public.com:389");
try { // Create the initial directory context
DirContext ctx = new InitialDirContext(env);
// Dont know the structure - What parameters to supply??
Attributes attrs = ctx.getAttributes("DC=myOrg,DC=int");
Thanks,
Ron