Hi, How do I authenticate against an LDAP directory using TomCat 4.1.2?
In my web.xml I have a resource that requires form authentication as follows: <login-config> <auth-method>FORM</auth-method> <realm-name>java:/jaas/LDAPLogin</realm-name> <!-- I tried with and without this --> <form-login-config> <form-login-page>/login</form-login-page> <form-error-page>/login-fail</form-error-page> </form-login-config> </login-config> I have read the JNDI Realm how-to and added the following few lines to my server.xml file. <Realm className="org.apache.catalina.realm.JNDIRealm" debug="99" connectionURL="ldap://ldapmachine:389" userPattern="uid={0},ou=Users,o=myOrg.com" roleBase="ou=Groups,0=myOrg.com" roleName="cn" roleSearch="(uniqueMember={0})"/> When I access a restricted URL the login page appears and I type in my credentials, but when I submit (to: j_security_check) I automatically get redirected to my login-fail page in a matter of nano-seconds (this in itself suggests that it is not working!). When I look in the TomCat log files I cannot see any references to any attempts to contact my LDAP directory. And when I look in the LDAP access log I cannot see any attempt to be contacted either. What step have I missed out or got wrong? Many thanks in advance Charlene __________________________________________________ Do You Yahoo!? Everything you'll ever need on one web page from News and Sport to Email and Music Charts http://uk.my.yahoo.com -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>