This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes JSP and the fly likes NT Authentication in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "NT Authentication in JSP" Watch "NT Authentication in JSP" New topic
Author

NT Authentication in JSP

Katia Platonov
Greenhorn

Joined: Sep 06, 2002
Posts: 13
Hello everyone,
I am using Tomcat-4.0.4 on NT4. I would like to do an NT authentication and I am not sure where to start.
Any help, pointers, etc. will be greatly appreciated.
Thank you.
Lana.
Zac Roberts
Ranch Hand

Joined: Jan 29, 2002
Posts: 82
What is an NT authentication? Is it like using basic or form based authentication in a web app using JSP?


Zac Roberts<br />SCJP2
Katia Platonov
Greenhorn

Joined: Sep 06, 2002
Posts: 13
Well, what I would like to do is grab user id from NT login and place it as a variable in a query in my JSP page.
Ruilin Yang
Ranch Hand

Joined: Jan 06, 2002
Posts: 150
In that case why do you need authentication for your JSP since you rely on NT Auth. as long as someone logged into NT you are OK.
Vedhas Pitkar
Ranch Hand

Joined: Jan 27, 2001
Posts: 445
Hi!I dont think that u can get the NT login in tomcat coz we tried it many times But finally ended up using a asp page which retrives the nt login & then redirects to a jsp page.Sorry 4 u.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Originally posted by Vedhas Pitkar:
Hi!I dont think that u can get the NT login in tomcat coz we tried it many times But finally ended up using a asp page which retrives the nt login & then redirects to a jsp page.Sorry 4 u.

Vedhas, please try to reduce the contractions in you posts. It just reduces understanding
thanks,
Dave.
Katia Platonov
Greenhorn

Joined: Sep 06, 2002
Posts: 13
To Ruilin Yang:
Unfortunately I am not "ok". NT login ID matches an ID in one of the user tables. I need to prepopulate the form with user information by recognizing him in this manner: extract NT id, put it into a variable and query the user table where user_id = 'StringNTid';
Thanks for everybody's input.
Lana.
Jose Velarde
Ranch Hand

Joined: Sep 11, 2002
Posts: 78
You can try this:
Zac Roberts
Ranch Hand

Joined: Jan 29, 2002
Posts: 82
Jose -
Great solution, I just tested on Tomcat with Windows NT and lo and behold up came my user name...
Vedhas Pitkar
Ranch Hand

Joined: Jan 27, 2001
Posts: 445
Sorry David.But my boss roams around these days So i try to keeps the messages short & sweet.
Zac Have u tried it with different NT machines?Because i think that the user.name() returns the name of the machine on whose JVM the code is currently running.We tried it but didnt work for us.Different machines ,that is.
Zac Roberts
Ranch Hand

Joined: Jan 29, 2002
Posts: 82
I did not try it on different machines yet but that is also a good point...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NT Authentication in JSP