This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Websphere and the fly likes Retrieve current Login ID 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 » Websphere
Bookmark "Retrieve current Login ID" Watch "Retrieve current Login ID" New topic
Author

Retrieve current Login ID

cb poo
Ranch Hand

Joined: Oct 02, 2002
Posts: 67
I am using LDAP for as my web application authentication. After login to the
page, I would like to display the current login user ID on my page. How to
retrieve my current login???
Please advise.
Kyle Brown
author
Ranch Hand

Joined: Aug 10, 2001
Posts: 3892
    
    5
Check in the Servlet spec for the method getUserPrincipal(). That will allow you to retrieve the logged in user.
Kyle


Kyle Brown, Author of Persistence in the Enterprise and Enterprise Java Programming with IBM Websphere, 2nd Edition
See my homepage at http://www.kyle-brown.com/ for other WebSphere information.
cb poo
Ranch Hand

Joined: Oct 02, 2002
Posts: 67
yes, it works. Thank you
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Retrieve current Login ID
 
Similar Threads
Fetching details from cookies
Session Problem
Why the value of my bean's property is always null
Database Connection
NT Authentication in JSP