Tim, Thanks for your reply. I do mean attributes. I don't know much about JNDI. (excuse me if I don't know the correct wording).
I do have one little JNDI program which I copied and altered. It hits active directory with an authorized connection name and OU and etc. All of which are hard-coded. Then, I change context to another hardcoded name and OU and can get certain attributes with that info. If I don't specify an OU, I don't find what I'm looking for. The problem is that when a user logs in, I don't know what their OU is. Tomcat handles that for me. I don't know how to plug in the correct "path" in to a user's data. All I know is getRemoteUser and that 1 little piece of info isn't enough to find a user's attributes with. When I look in my logs, I can see what DN tomcat followed to authenticate my user. That hints to me that I ought to be able to extract the "path" (DN?) to use. All I know about JNDI, I've found out in the last 2 weeks. If you have some coding examples you would care to share. I would greatly appreciate it. (I have seen the sun tutorial - it's incomplete where AD is concerned) Much appreciation Robyne -----Original Message----- From: Tim Funk [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 11, 2003 6:51 PM To: Tomcat Users List Subject: Re: Tomcat Authenticates to AD. How do I access AD variables? All their data? Do you mean the attributes of the user as stored in Active Directory? If that is the case - tomcat (or any servlet container) doesn't provide this functionality. But you can "easily" look it up via some JNDI calls since you know the name of the user. -Tim Robyne Vaughn wrote: > My web-app/web.xml fires off a form for authentication when my web-app > opening .jsp is requested. After being authenticated the opening .jsp > fires off. > > In my opening .jsp, how can I get user data from Active Directory? > > For instance, how would I retrieve their Surname, firstname, and > e-mail address from AD using my .jsp after Tomcat has authenticated > them? > > getRemoteUser gives me their login id, but I don't know how to get to > all their data since I don't know the path along which Tomcat found > them and authenticated them. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]