cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <Maxime.Ghey...@swisscom.com>
Subject FW: LDAP Transformer with XSP page?
Date Wed, 02 Jul 2003 09:14:58 GMT
The only thing that doesn't work are the <xsp:expr>

If I replace a value with a variable like :
...
<xsp:logic>
 String MyTest = "(cn=tfrgh*)";
</xsp:logic>
...
<ldap:filter><xsp:expr>MyTest</xsp:expr></ldap:filter>  
...

I get a "java.lang.NullPointerException" error :

java.lang.NullPointerException
	at
org.apache.cocoon.webapps.authentication.components.Authenticator.authen
ticate(Authenticator.java:288)
	at
org.apache.cocoon.webapps.authentication.components.DefaultAuthenticatio
nManager.login(DefaultAuthenticationManager.java:218)
	at
org.apache.cocoon.webapps.authentication.acting.LoginAction.act(LoginAct
ion.java:118)
	at
org.apache.cocoon.components.treeprocessor.sitemap.ActTypeNode.invoke(Ac
tTypeNode.java:133)

-----Original Message-----
From: Yury Mikhienko [mailto:Yury.Mikhienko@mobicomk.ru] 
Sent: Wednesday, July 02, 2003 7:23 AM
To: cocoon-users@xml.apache.org
Subject: Re: LDAP Transformer with XSP page?


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


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


Mime
View raw message