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:
-
Set up your development shell, as described in
Setting up
your environment.
-
Compile the files in this directory as shown in this examples for Windows NT:
$ javac -d %CLIENT_CLASSES% LDAPSearch.java
Run the example:
- Start the WebLogic Server in a new command shell.
-
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.
-
LDAPSearch(boolean)
-
-
listAttributes(NamingEnumeration)
-
-
main(String[])
-
-
searchLDAP(String, String)
-
LDAPSearch
public LDAPSearch(boolean useWebLogic) throws NamingException
searchLDAP
public NamingEnumeration searchLDAP(String baseContext,
String filter) throws NamingException
listAttributes
public void listAttributes(NamingEnumeration ne) throws NamingException
main
public static void main(String args[]) throws Exception
All Examples This Package