Trail: Java Naming and Directory Interface
Lesson: Naming and Directory Operations
Home Page > Java Naming and Directory Interface > Naming and Directory Operations


One of the most useful features that a directory offers is its yellow pages, or search, service. You can compose a query consisting of attributes of entries that you are seeking and submit that query to the directory. The directory then returns a list of entries that satisfy the query. For example, you could ask the directory for all entries with a bowling average greater than 200 or all entries that represent a person with a surname beginning with "Sch."

The DirContext interface provides several methods for searching the directory, with progressive degrees of complexity and power. The various aspects of searching the directory are covered in the following sections:

Problems with the examples? Try Compiling and Running the Examples: FAQs.
Complaints? Compliments? Suggestions? Give us your feedback.

Previous page: Add, Replace Bindings with Attributes
Next page: Basic Search - all specs in one place