All Examples   This Package

Class examples.jndi.LDAPSearch

examples.jndi.LDAPSearch

public class LDAPSearch
This example illustrates how to obtain an initial context for performing directory operations on an LDAPServer. Build example:
  1. Set up your development shell, as described in Setting up your environment.
  2. Compile the files in this directory as shown in this examples for Windows NT:
      $ javac -d %CLIENT_CLASSES% LDAPSearch.java
Run the example:
  1. Start the WebLogic Server in a new command shell.
  2. In your development shell, run the client with the following command:
      $ java examples.jndi.LDAPSearch t3://hostname:port LDAP_url F_or_T
    where:
    hostname
    Host name of the WebLogic Server
    port
    Port where the WebLogic Server is listening for connections (weblogic.system.ListenPort).
    LDAP_url
    The URL of the LDAP service provider. For this example, you may use "ldap://ldap.bigfoot.com:389"
    F_or_T
    "F" creates a direct connection to the LDAP server and "T" creates a connection to the LDAP server through the WebLogic Server.
Author:
Copyright (c) 1998 by WebLogic. All Rights Reserved., Copyright (c) 1998-1999 by BEA Systems. All Rights Reserved.

Constructor Index

 o LDAPSearch(boolean)

Method Index

 o listAttributes(NamingEnumeration)
 o main(String[])
 o searchLDAP(String, String)

Constructors

 o LDAPSearch
 public LDAPSearch(boolean useWebLogic) throws NamingException

Methods

 o searchLDAP
 public NamingEnumeration searchLDAP(String baseContext,
                                     String filter) throws NamingException
 o listAttributes
 public void listAttributes(NamingEnumeration ne) throws NamingException
 o main
 public static void main(String args[]) throws Exception

All Examples  This Package