Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Java in General and the fly likes Getting currenlt y logged in user name using JAVA API ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Getting currenlt y logged in user name using JAVA API ?" Watch "Getting currenlt y logged in user name using JAVA API ?" New topic
Author

Getting currenlt y logged in user name using JAVA API ?

Nishant
Greenhorn

Joined: Sep 17, 2002
Posts: 6
Can anyone tell me how to get the information of the logged in username using JAVA?
What I want to do is to make a HTML/JSP Web Page which will automatically take the windows authenticated username and display it on the second page when I press enter on the first page.
Thanks a lot
NA
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Nishant,
Please change your name to be compliant with JavaRanch's naming policy.
Your displayed name should be 2 separate names with more than 1 letter each. We really would prefer that you use your REAL name.
You can change your name: here.
Thanks,
Cindy


"JavaRanch, where the deer and the Certified play" - David O'Meara
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Many folks do not "log in" to Windows.
You would REALLY be restricting yourself - not only to ONLY Windows user, but only those that use that functionality.
Rodney Woodruff
Ranch Hand

Joined: Dec 04, 2001
Posts: 80
Try
System.getProperty("user.name");


Hope This Helps
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Getting currenlt y logged in user name using JAVA API ?
 
Similar Threads
Setting session to true and then invalidating
Getting currently logged in windows user information using JAVA API ?
pressing back button after logout shows loggedin contents
getUserpricipal()
Logging in to a site programmatically