When the user (client) tries to get into the application by typing the URL, i need to get that machine\'s windows logged in username.
I have tried with System.get
System.get
If this is for an intranet application, you can look at using NTLM (older) or Kerberos (newer) authentication (aka integrated windows authentication).
If you're using Spring security, look at the kerberos extension, http://blog.springsource.org/2009/09/28/spring-security-kerberos/.