aspose file tools*
The moose likes Tomcat and the fly likes How to retrieve the user id from the web browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "How to retrieve the user id from the web browser" Watch "How to retrieve the user id from the web browser" New topic
Author

How to retrieve the user id from the web browser

Brian Pembroke
Greenhorn

Joined: Jan 21, 2003
Posts: 6
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

Joined: Mar 22, 2000
Posts: 12823
    
    5
How are you handling user log-in?

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

String getRemoteUser();

Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to retrieve the user id from the web browser