User Guide
254 Developing Web Applications with ColdFusion
ATTRIBUTES="dn, objectclasses, attributetypes"
SCOPE="BASE"
FILTER="objectclass=*"
START=#EntryList.subschemasubentry#
>
<CFOUTPUT QUERY="EntryList2">
DN=#dn#<BR>
objectClasses: #objectclasses#<BR><BR><BR>
attribute Types: #attributetypes#<BR><BR>
</CFOUTPUT>
</BODY>
</HTML>
3. Change the SERVER from testldap.company.com to a valid LDAP server.
4. Save the template as
testldap.cfm in myapps under your Web root directory and
view it in your browser.
Note To be able to the schema for an LDAP server, the server must support
LDAP 3.0.
Querying an LDAP Directory
CFLDAP allows you to search an LDAP directory and output the results of your query
on a page. You can sort query results and return them to the browser or perform
further processing with CFOUTPUT, CFREPORT, and related tags.
Search Filters
A search string of the form attribute operator value defines the filter syntax. The default
filter, objectclass=*, returns all entries for the attribute.
The following table lists the filter operators. Note the prefix notation for the Boolean
operators.
CFLDAP Filter Operators
Operator Example
= o=allaire - organization name equals allaire
~= o~=alliare - organization name approximates allaire
>= st>=ma - names appearing after "ma" in an alphabetical state attribute
list
<= st<=ma - names appearing before "ma" in an alphabetical state
attribute list