Get method in the Attribute class. in JNDI
I had connected to the AD
// Create the initial directory context
DirContext ctx = new InitialDirContext(env);
Attributes attrs = ctx.getAttribute("DC=DomainDnsZones,DC=testing,DC=local");
but I had no idea wat to get from the attrs.get method.
as in, I don't know what kind of attributes ID are available inside my attrs
is there any coding to get all the attribute ID so tat I can use the get method to retrieve them?
[464 byte] By [
AdrianHBKa] at [2007-11-27 8:41:21]

# 1
We can get the available Attributes for a particular user.....
using Attributes class for a Search and Context....
You can try out the free LDAP viewer available in internet (Its a Applet)... u can find the possible Attribute Names in that... and use the below statement..
Attributes attrs1 = ctx.getAttributes("CN=" + "user,CN=Users,DC=domain,DC=dmn,DC=com");
String office = (String)attrs1.get("physicaldeliveryofficename").get();