How to get current logged in Windows username?

Ads
 

How to get current logged in Windows username?

Can anyone give me the struts code to get the logged in Windows User name?

View Answers

July 10, 2008 at 10:56 AM

Hai srinath,

July 10, 2008 at 11:00 AM

hai srinath, use the following statement in your particular servlet/jsp. "String loginid = System.getProperty("user.name");" the above mentioned command displays the username who logged in to the system.hope this will solve your problem.

Ads









Related Tutorials/Questions & Answers:
How to get current logged in Windows username? - Struts
How to get the current date in Java?
Advertisements
How to get system current cursor type
How to get current timestamps in Java
how to get current date without system date
How many ways can we get the value of current session id?
How can we get second of the current time using date function?
Java current date - How to get current date in Java
Video Tutorial: How to get windows username in Java
Get current working directory in Java
JDBC: Get current Date and Time Example
Get current country from iPhone ??
JDBC: Get current TimeStamp Example
Get current page URL from backing bean
Java get windows Username
Java get windows Username
How to reload the current page?
Java program to get current date
Fetch logged in username in Spring Security
How to print current time in r?
Get current Date and Time
How to display the current time
Get Current Directory
How to get Java SDK
How to display windows virtual keyboard
How to install JDK 7 in windows
how to get UIView by tag
Java Example program to get the current working directory
Google Map get Current Location on iphone and Android phones
How To Install Windows 8
How to upgrade mysql 5.1 to 5.5 windows

Ads