相关代码 |
|
This example uses the JNDI/LDAP service provider to connect to an LDAP server on the local machine and initializes its connection request controls. try { // Create connection controls to use Control[] connectCtls = new Control[]{new SomeControl()}; LdapContext ctx = new InitialLdapContext(env, connectCtls); } catch (NamingException e) { }