File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes how to get the network login from the user? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to get the network login from the user?" Watch "how to get the network login from the user?" New topic

how to get the network login from the user?

Bruno Santos

Joined: Nov 11, 2004
Posts: 7
Is there a way to get the user's network login (windows and linux) that made the request to the servlet? I tried request.getRemoteUser() but it's return null.

any ideias?
Jeroen Wenting
Ranch Hand

Joined: Oct 12, 2000
Posts: 5093
That information is not contained in the HTTP request (and why should it be? Doing so would bring a massive security risk).

Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
Somebody told me the other day that they made an Active-X control that calls Windows APIs to get the network identity. They can embed it on a page or applet and get the information. (Requires a security policy no doubt.) They figure that if a user logs on the network the userid has been sufficiently validated for them. Our customers rejected this concept because the person at the keyboard may not be the one who signed on the network ... supervisors come around to help or diagnose problems or whatever. If you go this route, you'd want your users to be pretty darned careful about locking the workstation when they walk away.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I agree. Here's the link:
subject: how to get the network login from the user?
It's not a secret anymore!