Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How can I access the LDAP with Java?  RSS feed

 
Tom Hut
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there!
I'm looking for a simple example for connecting to a LDAP server with Java / JNDI. For searching some datarecords e.g names and addresses.

I�don't unstand the api verry well, so I decided to ask in this Forum.

I hope some could give me a little help, cause it's important for me and my job...


thx a lot!
 
pascal betz
Ranch Hand
Posts: 547
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

sun has a tutorial on JNDI:
JNDI tutorial (there are )examples in this tutorial.
and of course
google knows more.

i think as soon as you have a more concrete question you will find lots of help here.

cheers

pascal
 
Tom Hut
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Pascal,

thanks for your reply!

Now, I 'll try the tutorial and see if it's working.

May you have a little Code sample for me? like in the tutorial, but just a complete and runnig code? which i could paste into eclipse and try on it?
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch, Tom!

LDAP and JNDI is a bit beyond the beginner topics discussed in this forum.

I'm moving this to the EJB and Other J2EE Technologies forum...
 
Tom Hut
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dirk, thanks for the welcome greet!

I made some tutorials and tried some code and
now Eclipse gives me some Errors, which I couldn'T turn off.

Here's the Code:

got it from: Java Developers Almanac

ctx..... and process(attr).. create Error messages.
Maybe some import is missing ? or a declaration?

please help. thx
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!