How to get current logged in Windows username?

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.









Related Tutorials/Questions & Answers:
How to get current logged in Windows username? - Struts
How to get system current cursor type
Advertisements
How to get the current date in Java?
How to get current timestamps in Java
how to get current date without system date
Java current date - How to get current date in Java
How many ways can we get the value of current session id?
How can we get second of the current time using date function?
Video Tutorial: How to get windows username in Java
Get current country from iPhone ??
Java get windows Username
JDBC: Get current Date and Time Example
Get current working directory in Java
Get current page URL from backing bean
JDBC: Get current TimeStamp Example
Fetch logged in username in Spring Security
How to reload the current page?
Java get windows Username
ModuleNotFoundError: No module named 'python-usernames'
ModuleNotFoundError: No module named 'reddit-usernames'
ModuleNotFoundError: No module named 'python-usernames'
ModuleNotFoundError: No module named 'reddit-usernames'
Get current Date and Time
Java program to get current date
How to print current time in r?
Get Current Directory
How to display the current time
How to install ffmpeg on Windows?
How to install ffmpeg on Windows?
ModuleNotFoundError: No module named 'django-email-usernames'
ModuleNotFoundError: No module named 'logged_requests'
How to display windows virtual keyboard
How to install JDK 7 in windows
Google Map get Current Location on iphone and Android phones
Java Example program to get the current working directory
Windows 8 Advantages and Disadvantages
How To Install Windows 8
ModuleNotFoundError: No module named 'drf-logged-validation-error'
ModuleNotFoundError: No module named 'drf-logged-validation-error'
JSP Current Path
how to access windows registry information using java?
How to upgrade mysql 5.1 to 5.5 windows
How to develop iphone application on windows OS?
How to download and install Java 8 on Windows?
How to display current date in textbox - Date Calendar
get current date in java in yyyy mm dd hh mm ss format
session maintaining after logged in in jsp
How to install JDK 17 on Windows 10
How to install JDK 17 on Windows 10
How to install JDK 17 on Windows 10

Ads