Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using Active Directory Services in JSP?

Status
Not open for further replies.

BabyJeffy

Programmer
Sep 10, 2003
4,189
GB
I've been asked to write a phone book lookup (ie: read-only) web application using Apache Tomcat 4.1 (on Win32). The U/I requirements are not a problem, and I am fairly adept at crafting my JSP code... but there I come unstuck.

As I understand it, I will need to talk to the Active Directory Services on the Windows network from within my web application.

I've looked all over but can't find details (or examples) for anything like this.

Is anyone out there able to offer me some advice/direction on this?

Cheers,
Jeff
 
Have you found a product (or written one) that fullfills the purpose of using ad as a phone book?
 
As a matter of fact... I've just completed development and delivery of the solution for our intranet.

In a nutshell, MS Active Directory shares part of it's data as an LDAP server. This can be modified and extended from the Administrators control. It shares on the same standard port... and acts just like your home grown LDAP server (I sound so confident now... but that wasn't always so).

We were attempting to do this using JSP - and there were several examples of ASP solutions. I decided to use an LDAP taglibrary -- but this failed as it had limited functionality and was too restrictive.

Based on some suggestions from the Java people, I started looking into the Java Context Factory (of which there were many examples). Within a few hours I was able to connect, authenticate and search an non-anonymous Active Directory on first and last names (of course much more is possible -- but that was the scope).

The biggest hurdle for me was understanding how the LDAP schema was set up. That was just a learning curve thing... lots of online resources to help.

I don't know of any commercial solutions out there... but this stuff isn't secret... and so many tutorials exist, that I doubt you would have a problem finding someone who could code you a solution.

Sorry for the rant... it's late and it was a good week :)

Jeff

PS. I extended the phone book lookup to allow querying on the departments within the company (they loved that feature - that was 1 line of code). I present a list of matches to their query, then allow them to click one. This triggers another lookup to the AD and I retrieve back a bunch of other data about that entry. You can expose lots of data to the LDAP service... so watch your security.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top