Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to retrieve the user id from the web browser

 
Brian Pembroke
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to be able to retrieve the user id of the user logged in from the web browser. I do not want to prompt the user for a login id and password. The is for an internal application. All the users will be using IE and Windows. I need to be able to retrieve the id from a Java Servlet.

This is a very easy thing to do in IIS.
HttpContext.Current.User.Identity.Name.ToString()

Any ideas would be greately appreciated.

Thanks,
Brian
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How are you handling user log-in?

I suggest you look at the methods in the API for HttpServletRequest - for example:

String getRemoteUser();

Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic