Hi all,

My servlet talks to an ladap server directory. My servlet worked fine
when I was testing it with the web server with jsdk2.1. Now I have installed
JRun on Netscape Enterprise Server and the servlet does not "seem" to work.
All I do is try and authenticate a user dn with a password. But even the correct
dn matching password returns false (see code below). I returned a Exception.
getMessgage() to see what the error was and all it returned was the ldap
host address e.d ldapsever.com. Any ideas on this matter ?

cheers,

Gerardo


 public boolean verifyUserPassword(String userId, String password)
 {
  if ( userId.equals("") || password.equals("") )
   return false;

  env.put(Context.SECURITY_AUTHENTICATION, "simple");
  env.put(Context.SECURITY_PRINCIPAL,"uid="+userId+",o=Corel");
  env.put(Context.SECURITY_CREDENTIALS,password);

  try
  {
   ctx = new InitialDirContext(env);
  }
  catch(CommunicationException en)
  {
   return false;
  }

  catch(AuthenticationException e)
  {
   return false;
  }
  catch(Exception em)
  {
   return false;
  }

  return true;
 }

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to