Setup for EGL access to LDAP

Before you begin

Before you configure and run the EGL LDAP sample, you must select an LDAP-compliant server. If you do not have an LDAP-compliant server, you can use an open-source server (such as, ApacheDS) and client (such as, Apache Directory Studio) that provides access to that server. For details, see Configuring LDAP-compliant software.

About this task

These setup instructions are specific to ApacheDS and Apache Directory Studio. If you use a different LDAP-compliant server, your configuration might vary.

Procedure

  1. To import the sample projects into your workspace, on the EGL access to LDAP page, click Get the sample. Allow the workspace migration tool to perform any necessary migration.
  2. If you use an LDAP-compliant server, go to the sample project itself, open each of the following files and make sure that the content is appropriate for your server:
    • EGLSource/libraries/LdapLoginLib.egl, where you might need to change the following providerURL entry:
      providerUrl String = "ldap://localhost:389/o=sample";
    • EGLSource/libraries/UserObjectLib.egl
  3. Import the sample data from the SampleCompany.ldif file onto your directory server.
    • If you use an existing LDAP-compliant server, import the sample data from SampleCompany.ldif, which is in the following location:
      workspace/LDAPSample/
    • If you use the open-source Apache software for demonstration purposes, import the sample data onto your ApacheDS directory server by following the instructions in Importing sample data using Apache Directory Studio.
  4. To generate the code, use the LDAPSampleWebBuildOptions build descriptor, which is in LDAPSample.eglbld.
  5. On a web application server, run ldapLogin.jsp.
  6. On the login page, type a user ID that is stored in the LDAP-compliant server (for example, jfryer) and use the password pass.
  7. Click OK.
  8. The data that corresponds to the user ID is displayed on the employee- or customer-related web page (in the case of jfryer, the data is displayed on the employee-related page).

Feedback