cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yury Mikhienko <Yury.Mikhie...@mobicomk.ru>
Subject Re: LDAP Transformer with XSP page?
Date Wed, 02 Jul 2003 05:23:27 GMT
On Tue, 1 Jul 2003 16:20:59 +0200
<Maxime.Gheysen@swisscom.com> wrote:

> Is it possible to create the ldap.xml, with the ldap queries in a xsp
> page?
> 
Yes, for example:

<xsp:page
        language="java"
        xmlns:xsp="http://apache.org/xsp" 
        xmlns:ldap="http://apache.org/cocoon/LDAP/1.0">

  <page>
      <xsp:logic>
      String cn = request.getParameter("cn");
      if(cn == null) cn = "*";
     </xsp:logic>
      <ldap:execute-query>
      <ldap:initializer>com.sun.jndi.ldap.LdapCtxFactory</ldap:initializer>
      <ldap:serverurl>ldap://ldaphost</ldap:serverurl>
      <ldap:port>389</ldap:port>
      <ldap:scope>OBJECTS_SCOPE</ldap:scope>
      <ldap:rootdn>cn=Directory Manager</ldap:rootdn>
      <ldap:password>password</ldap:password>
      <ldap:searchbase>ou=people,o=company</ldap:searchbase>
      <ldap:attribute>cn</ldap:attribute>
      <ldap:attribute>sn</ldap:attribute>
      <ldap:attribute>givenName</ldap:attribute>
      <ldap:attribute>initials</ldap:attribute>
      <ldap:attribute>mobile</ldap:attribute>
      <ldap:attribute>mail</ldap:attribute>
      <ldap:attribute>ou</ldap:attribute>
      <ldap:attribute>uid</ldap:attribute>
      <ldap:attribute>title</ldap:attribute>
      <ldap:show-attribute>true</ldap:show-attribute>
      <ldap:filter>(&amp;(uid=<xsp:expr>cn</xsp:expr>)(mobile=*))</ldap:filter>
     </ldap:execute-query>
  </page>
</xsp:page>



-- 
 
Best regards,
Yury Mikhienko.
IT engineer, ZAO "Mobicom-Kavkaz"

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message