How to get client windows User name when user hits application URL?

Hi,


My requirement is simple, I will run my Java web application in tomcat or glassfish. when user hits URL I need to get logged in windows user name (user name is enough). Do you have any component for this? If so please share with me. If you have any solved questions for the same requirement, please share the link as well.


Thanks,
Thiyagu Paulraj

Hi Thiyagu,

We do not have any component for this purpose. This is a simple case and can be achieved using following Java code.

String username = System.getProperty("user.name");

Best Regards,

Yes Muhammad Ijaz agree, I come across this answer in google search also. This will give you only server user name where you have deployed your apllication, but I need client user name who are all running my application (note: user name only). Meaning to say that, we should run piece of code from JavaScript or related technologies.


Thanks,
Thiyagu Paulraj

Hi Thiyagu,

Thanks for the details. This feature is beyond the scope of Aspose APIs so you can search for another vendor to get this feature.

Best Regards,