Java Reference
In-Depth Information
Directory Requirements
N
OTE
To follow the examples in this chapter, you will need to create a Web application
named
ldap
, following the steps in Appendix A, “Web Applications and Configuring
the Servlet Engine.” Make sure you have the classes
Controller
and
Service
in your
Web application's classpath. You will also need to have, from Chapter 11, “Servlets
and LDAP,” the classes
LDAPObject
and
LDAPManager
in your Web application's class-
path.
In this chapter you will again create an online directory service. This system will be based on
the server-side implementation of the MVC as defined in Chapter 13, “A Servlet Controller.” It
will be a front end to a Lightweight Directory Access Protocol (LDAP) server. The basic
requirements are defined as follows:
•
Directory
—The LDAP application must enable the user to list the current directory of
the LDAP
People
object.
•
Insert
—The LDAP application must enable the user to enter a new
People
object.
•
Delete
—The LDAP application must enable the user to select a
People
object from the
directory to remove from the server.
Models
The only model that you will describe is a subset of the
People
object as defined by the LDAP
server. This object will be managed by your
LDAPObject
from Chapter 11. Table 21.1 lists the
elements needed to represent a
People
object.
T
ABLE
21.1
Required Attributes to Model a
People
Object
Attribute
Type
String
uid
String
sn
String
givenName
String
mail
String
telephoneNumber
String
dn
In addition to the
LDAPObject
you will use the
LDAPManager
, also from Chapter 11, to commu-
nicate with your LDAP server.