Dopo innumerevoli prove ho scoperto che funziona così:
Grazie di tutto.codice:public boolean InterrogaLDAP(String usr, String psw) { boolean blLdapVerify = false; String stSecurityPrincipal = usr + "@dominio"; Properties env = new Properties(); env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory"); env.put(Context.PROVIDER_URL, "ldap://atmdc03:389"); env.put(Context.SECURITY_AUTHENTICATION, "simple"); env.put(Context.SECURITY_PRINCIPAL, stSecurityPrincipal); env.put(Context.SECURITY_CREDENTIALS, psw);
Ciao
Massimo

Rispondi quotando