How to get Windows user name
tomcat server is running on my machine. when call the URL of web application from another system it's working. i want to get the windows username of the system which one use the URL.
using the following code to the windows username.
com.sun.security.auth.module.NTSystem NTSystem = new com.sun.security.auth.module.NTSystem();
But what the issue it's bring my pc windows username. how can i get the pc name which is used my URL. please do the needful.
thanks & regards,
Re: How to get Windows user name
You can only get that if it's supplied by the client.
It's not something that is supplied in an http request normally.