Connecting to LDAP server

In this post under Java LDAP, I will explain how to connect to LDAP server with an example. Below is the complete code Main Code 1 import java.util.Hashtable; 2 3 import javax.naming.Context; 4 import javax.naming.NamingException; 5 import javax.naming.directory.DirContext; 6 import javax.naming.directory.InitialDirContext; 7 8 public class LDAPDemo1 { 9 public static void main(String[] args) { 10…… Continue reading Connecting to LDAP server