The sample presents a login page for a web application. If you type a user ID and password that match a user ID and password pair that is stored in the LDAP-compliant server, a JSF handler retrieves the related data from the server stores the data in a user object (an EGL basic record) assigns the user object to the J2EE session and uses the data to direct processing.
| Category | Folder | File | Description |
|---|---|---|---|
| Must be customized in almost all cases | EGLSource/libraries | LDAPLoginLib.egl | Library that contains variables and functions that are used in the login process |
| UserObjectLib.egl | Library that contains functions that assign data from the directory server to the user object | ||
| May be customized | WebContent | ldapLogin.jsp | Faces a JSP page for login |
| EGLSource/jsfhandlers | LdapLogin.egl | JSF handler for that page | |
| Do not require customization | EGLSource/com/ibm/egl/ldap | LdapExternalTypes.egl | Set of external types that are based on Java™ Naming and Directory Interface (JNDI) LDAP classes |
| EGLSource/com/ibm/egl/ldap | LdapLib.egl | Library functions that declare variables based on the external types and that access an LDAP-compliant server | |
| Included only to make the sample work | WebContent/sample | customerData.jsp | Facesa JSP page that displays customer data |
| EGLSource/jsfhandlers | CustomerData.egl | JSF handler for that page | |
| WebContent/sample | employeeData.jsp | Faces a JSP page that displays employee data | |
| EGLSource/jsfhandlers | EmployeeData.egl | JSF handler for that page |
The EGL with LDAP Support project feature adds the LDAPExternalTypes.egl and LDAPLib.egl files to a project. To add LDAP support to a new EGL project whose code will access an LDAP-compliant server, in the new EGL Project wizard, click Show Advanced Settings; then click EGL with LDAP Support. To add LDAP support to an existing project, in the Properties page of the project, add the project feature.