An Java application is hosted in Linux server. and we are trying to access the windows username of the user who tries to access the application using browser.
In the jsp, we are trying to print the username of the user with the below lines of code.
<% String user = System.getProperty("user.name");
out.println(user);
%>
But the output prints the username of the linux server and not the windows user.