# ADF and LDAP

### Overview

The goal of this sample application is to demonstrate how to build a programmatic Data Control on top of an LDAP Server. It shows how to access an LDAP Server from the J2EE APIs, and how to access it as a Data Control.
Then, to make sure it is working, we will run a small ADF Client Application that accesses it.

### Requirements

You must have JDeveloper 10g and access to an LDAP Server.
The example provided here accesses the Verisign public LDAP Server. If you are behind a firewall, or for another reason cannot access the server,

1. Open the Model project
2. Locate the file called LDAPSearch.java, in the `dc.ldap.model` package
3. Modify the lines 25 and 27 with the information for your LDAP server

You can possibly test your modifications, by going to the java file named Test.java located in the `dc.ldap.runtime` package, modifying line number 16, and running this class. The output is redirected to the Log Window. If this runs without errors, your DataControl is ready to work.

To control your search parameters,

1. In the View project, locate and select DataBinding.cpx
2. In the Structure Pane, go to Data Controls | LDAPCollectionDataControl | Parameters | FILTER
3. In the Property Inspector, modify the value to match your search parameter
4. Save the project.

### Running the sample

To run the sample right-click on the View project and select Run from the context menu.