This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes JSP and the fly likes Can I get a userid from Windows Authenication from a JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Can I get a userid from Windows Authenication from a JSP" Watch "Can I get a userid from Windows Authenication from a JSP" New topic
Author

Can I get a userid from Windows Authenication from a JSP

Rich Barry
Greenhorn

Joined: Jan 28, 2002
Posts: 19
Hi,
I was wondering if there was a way for a JSP page to get the userid from a users windows login???
Is this possible??
Thx,
Rich
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Complicated. The answer is 'no', except when the answer is 'yes'...
If a user is logged on to their person computer and visits the JSP, you cannot get the name that they logged in as.
However, you can (in some servers like WebSphere) get the JSP to authenticate against the windows login - but all this functionality is driven from the server side. If the JSP is secured, (BASIC or FORM based authentication), the first time they ask for the page they will be challenged for a username and password. These details can be validated against the server. After that the userid is available via request.getRemoteUser()
Dave
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Can I get a userid from Windows Authenication from a JSP
 
Similar Threads
Action Class
Problems with getRemoteUser()
Basic Windows Authentication in Weblogic
html:hidden
Windows Authentication