3
I have a problem that I do not know if it is possible to solve, I am in the development of an intranet system and I need to get the name of the local user(ie in pc client).
tried to use System.getenv("username")
, which returned the server machine user name.
I tried too request.getRemoteUser()
, request.getUserPrincipal()
, request.getAuthType()
and they all returned NULL
.
Someone knows how to do it?
If it is in the client, it is not local user, yes, in the remote user, unless the client uses the same machine of the application.
– user28595
This answer on SOEN answers your question, see if you understand: How to get the remote user’s username in java
– user28595
the user will not use the host q the system is, the system is on a separate machine which is the server
– user3061516