Re: Serving LDAP
Re: Serving LDAP
- Subject: Re: Serving LDAP
- From: Zak Burke <email@hidden>
- Date: Sun, 05 Jun 2005 22:20:33 -0400
時期 精霊 wrote on 6/5/05 5:33 PM:
Hello,
I have a WO app that contain a web based address book.
We want to provide LDAP access to this address book, is there any best
way with WO? Frameworks?
An alternative, would be to allow exporting to LDIF.
I use the following to generate Mozilla-Thunderbird compatible LDIF files:
Use appendToResponse to set the headers, forcing the LDIF file to be
downloaded:
public void appendToResponse (WOResponse response, WOContext context)
{
response.setHeader("application/x-unknown","content-type");
response.setHeader("attachment;filename=address_book.ldif","Content-disposition");
super.appendToResponse(response, context);
}
and format your records like this, replacing the <variables> with WOStrings
dn: cn=<first> <last>,mail=<email>
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: inetOrgPerson
givenName: <first>
sn: <last>
cn: <first> <last>
mail: <email>
telephoneNumber: <phone>
title: <position title>
o: <department name>
HTH,
zak.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden