On 11/14/07, Hashir, Mehedi <[EMAIL PROTECTED]> wrote:
> Hi Folks ,
> Using   JNDI Tags and accessing LDAP directory.
> How do I supply the Security,  prinicpal and credential attributes ,
> needed to complete this call successfully. ?
> Is there something else I need to configure ? Is this possible with the
> current version of JNDI tags ?
>
> This is the code written up to now, and below is the result
> <jsp:useBean id="exampleMap" class="java.util.Hashtable"/>
> <c:set target="${exampleMap}" property="Context.SECURITY_AUTHENTICATION"
> value="simple" />
> <c:set target="${exampleMap}" property="Context.SECURITY_PRINCIPAL"
> value="cn=bacd" />
> <c:set target="${exampleMap}" property="Context.SECURITY_CREDENTIALS"
> value="xyz" />

Try:

<c:set target="${exampleMap}"
       property="java.naming.security.authentication"
       value="simple" />
<c:set target="${exampleMap}"
       property="java.naming.security.principal"
       value="cn=bacd" />
<c:set target="${exampleMap}"
       property="java.naming.security.credentials"
       value="xyz" />

> <jndi:useDirContext
>     id="test"
>     scope="page"
>     initialFactory="com.sun.jndi.ldap.LdapCtxFactory"
>     providerUrl="ldap://ldaptest01:389";
>     env="${exampleMap}"
>
> />
>
> ====================
> javax.naming.AuthenticationException: [LDAP: error code 49 - Invalid
> Credentials]
>
> Thanks
>
> Mehedi

-- 
Kris Schneider <mailto:[EMAIL PROTECTED]>
directThought  <http://www.directThought.com/>

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

Reply via email to