Alan Boldock wrote:
> 
>    Hi
> 
> Has anyone had much experience/success in getting a Servlet
> to interrogate an LDAP server and return some user info/authentication?
> 
> is it easy?

My application was quite trivial as was the LDAP code; I used
the Netscape LDAP SDK (was some 6 months ago). This is an example

        try {
            ld = new LDAPConnection();
            ld.connect(LDAPHost, LDAPPort);

            String filter = "rdn=" + uid;
            LDAPSearchBase = "o=" + org;
            LDAPSearchConstraints cons = ld.getSearchConstraints();
            cons.setBatchSize(0);
            LDAPSearchResults res = ld.search(LDAPSearchBase,
                                              LDAPConnection.SCOPE_SUB,
                                              filter,
                                              null,
                                              false,
                                              cons);
            while (res.hasMoreElements()) {
 
                try {
                    findEntry = res.next();
                } catch (LDAPReferralException e) {

            [snip]

         } catch( LDAPException e ) {

e.

========================================================================
Enrico Badella                       email:   [EMAIL PROTECTED]
Soft*Star srl                                 [EMAIL PROTECTED]
InterNetworking Specialists          tel:     +39-011-746092            
Via Camburzano 9                     fax:     +39-011-746487
10143 Torino, Italy

  Wanted, for hobbist use, any type of PDP and microVAX hardware,software,
  manuals,schematics,etc. and DEC-10 docs or manuals
==========================================================================


------------------------------------------------------------
To subscribe:    [EMAIL PROTECTED]
To unsubscribe:  [EMAIL PROTECTED]
Problems?:       [EMAIL PROTECTED]

Reply via email to