File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 12760
    
    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
 
Similar Threads
Stopping a backend process if user closes the browser window
Struts 2 create and set values of model object
confirmation identity via email
How to download a file from a database using jsp
EJB and JMS - creating a unique message ID