Configuring this project takes approximately 5 minutes.
Before you begin
The Rich UI access to LDAP sample requires the following:
- LDAP-compliant server
- IBM® WebSphere® Application Server
- com.ibm.egl.rui project in your workspace
If you do not have an LDAP-compliant server, you can use
an open-source server (such as ApacheDS), and a client (such as Apache
Directory Studio) that provides access to that server. To install
ApacheDS and Apache Directory Studio, see Configuring LDAP-compliant software.
Verify that you have
the WebSphere Application
Server feature installed and that the runtime environment is specified.
- The features are listed during the installation process and the
installed feature must match the level of the WebSphere Application server. To see which
features are installed, start IBM Installation
manager. Click . If you do not have the appropriate feature installed,
use the IBM Installation Manager
Modify function to install the feature.
- To specify the location of the application server, click . Select the appropriate server and type the location.
The com.ibm.egl.rui project is created automatically when
you use the Create an EGL Rich UI project wizard. If you do not have
this project, click Get the dependency project to
import it into your workspace on the Rich UI access to LDAP page.
About this task
To
run the sample, do the following:
Procedure
- To import the sample projects into your workspace on the Rich UI access to LDAP page, click the Get
the sample link. Allow the workspace migration tool to
perform any necessary migration. . If the workspace migration tool
prompts you to select a runtime server, select the WebSphere Application Server that you are
using to run this sample.
- If the default port for your WebSphere Application Server is not 9080,
do the following:
- Double click WebBindings.egl in
the LdapRuiSample/EGLSource/bindings folder
to open the EGL Editor.
- Change the port in constant ldapUri to the one used
by your runtime server.
- Close the file, saving the changes.
- Double click on LdapRuiSample.egldd in
the LdapRuiSample/EGLSource folder to open it
in the EGL Deployment Descriptor Editor.
- Click the Service Binding tab
and change the port in the base URI to the one used by your runtime
server.
- Close the file, saving the changes.
You can find the default port for your runtime server using
the Administrative Console.
- If you use an existing LDAP-compliant server go to the
LdapRuiServices project, open the following files and make sure that
the content is appropriate for your server:
- In your LdapRuiSample project, find the SampleCompany.ldif file.
From that file, import the sample data.
- To generate Java™ code
into LdapRuiServices for the web services in the project, right click LdapRuiServices,
and then click Generate.
- To generate JavaScript code
into LdapRuiSample for the parts in the project, right click LdapRuiSample,
and then click Generate.
- Update the EGL deployment descriptor in LdapRuiSample
- Double click LdapRuiSample.egldd to
open the EGL deployment descriptor editor.
- Ensure that the Target project radio
button is selected.
- Click New and type LdapRuiDeployed
in the Project name field.
- Select a specific version of WebSphere Application
Server as the runtime server. The value for Dynamic
web module version is 2.5 for versions at or greater
than 7.0.
- Ensure that the Add project to an EAR checkbox
is checked.
- Click New Project and type LdapRuiDeployedEAR
in the Project name field.
- Click Finish to create the EAR
project.
- Click Finish to create the dynamic
web project.
- Ensure that LdapRuiDeployed is specified as the target
project and then close the deployment descriptor editor, saving the
changes.
- Deploy the Rich UI application:
- Select LdapRuiSample.egldd .
- Right click and select Deploy EGL Descriptor.
The LdapRuiDeployed and LdapRuiDeployedEAR projects are
displayed in your workspace.
- Add LdapRuiDeployedEAR and LdapRuiServicesEAR to your IBM WebSphere Application Server as follows:
- In the Servers view, right click you WebSphere Application Server then click Add
and Remove Projects.
- Click .
- Click .
- Click Finish.
- In the Servers view, start your WebSphere Application Server.
- Run the sample Rich UI application:
- Expand the LdapRuiDeployed project and WebContent.
- Right click SampleCompany-en_US.html then
click .
- Make sure that your WebSphere Application
Server is selected. Click Finish.
- On the Sample Company login page, type a user ID that
is stored in the LDAP-compliant server (for example, msmith) and use
the password pass for whichever name you use. Click Log
in.
The data that is associated with the user ID is displayed.
You can use Apache Directory Studio to see other sample user IDs
that are stored in the LDAP-compliant directory. To see the data
for other users, enter other user IDs and use pass for the
password. The fields that are shown for employees vary from those
shown for customers.To prevent an authentication error, make sure
that the ApacheDS directory server is started. For the instructions
to start the server, see the end of Configuring LDAP-compliant software.