When using JNDI with LDAP, how can I get the DN (Distinguished Name) from a DirContext?
Created May 4, 2012
Fdo J. Rendón Quiles If you get the DN for a DirContext you have to use the method,
getNameInNamespace()
. This method retrieves the full name of this context within its own namespace. For example:
DirContext ctx; // ... ctx.getNameInNamespace();