configuring BasicAuthenticator

2005-08-30 Thread ferrante
Is there a way that I can set the error page URL and number of  
retries allowed for the BasicAuthenticator?


Thanks

---rdf

--
Richard D. Ferrante
Assoc Principal Software Engineer
Millennium Pharmaceuticals
40 Landsdowne St.
Cambridge, Ma. 02139
[EMAIL PROTECTED]
Phone: 617-679-7466
Fax: 617-577-3555





This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, proprietary 
and/or privileged.  This e-mail is intended only for the individual(s) to whom 
it is addressed, and may not be saved, copied, printed, disclosed or used by 
anyone else.  If you are not the(an) intended recipient, please immediately 
delete this e-mail from your computer system and notify the sender.  Thank you.



new InitialDirContext(env); instantiating with invalid user info

2005-08-18 Thread ferrante


I've been trying to use the code below to validate a username/ 
password against an LDAP (ActiveDirectory) server


When I use this in a main from the command line with a bad password I  
get



Exception in thread main javax.naming.AuthenticationException:

[LDAP: error code 49 - 80090308: LdapErr: DSID-0C09030B, comment:  
AcceptSecurityContext error, data 52e, v893]


but when from a servlet in Tomcat,  I proceeds without error.

I googled for answers but couldn't quite find anything that quite  
matches my situation  -- I'm runing Java 5 and Apache Tomcat/5.5.7


I thought it might have to do with realms, so following some  
recommendations I commented out the realm info in the server.xml, but

it didn't have any effect.

Any info/pointers would be appreciated.

Thanks

---rdf

   Hashtable env = new Hashtable();
 try {
 env.put(Context.PROVIDER_URL, ldap://ldapHost:389;);
 env.put(Context.SECURITY_AUTHENTICATION, simple);
 env.put(Context.SECURITY_PRINCIPAL,  + userId +
@domain);
 env.put(Context.SECURITY_CREDENTIALS, password);
 env.put(Context.REFERRAL, follow);
 env.put(Context.INITIAL_CONTEXT_FACTORY,
com.sun.jndi.ldap.LdapCtxFactory);
 DirContext ctx = new InitialDirContext(env);


--
Richard D. Ferrante
Assoc Principal Software Engineer
Millennium Pharmaceuticals
40 Landsdowne St.
Cambridge, Ma. 02139
[EMAIL PROTECTED]
Phone: 617-679-7466
Fax: 617-577-3555






This e-mail, including any attachments, is a confidential business 
communication, and may contain information that is confidential, proprietary 
and/or privileged.  This e-mail is intended only for the individual(s) to whom 
it is addressed, and may not be saved, copied, printed, disclosed or used by 
anyone else.  If you are not the(an) intended recipient, please immediately 
delete this e-mail from your computer system and notify the sender.  Thank you.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]