I am building an application based on GXT (J2EE). Now the problem is that I have to connect the application to a LDAP server. Can you tell me how to connect a LDAP server from our java application and what Library or API I will have to use for that?
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
You can even use Netscape LDAP SDK which is currently not active but gives more control in LDAP Programming
The JNDI’s interfaces, classes and exceptions are available in the following packages come with JDK:
That means we don’t have to use any external libraries for working with LDAP servers, in most cases.
That specifies URL of a LDAP server consists of hostname on which LDAP Server is running port number. A well known port number of the Lightweight Directory Access Protocol is 389 which is default.
Also need to specify some environment properties for the connection and authentication in a Hashtable object.
Here is the sample code:
To connect to LDAP, check out the following packages/classes:
Example code:
In this example I have a Configuration object that reads these values from a config file.
The values would be :