0

I am developing one intranet application. i want to get the windows login username to log into my application.

because i want to check whether the same user is logging into the application or not.

i worked on using req.getRemoteUser() but it is returning null.

i am using the server is Tomcat6.x, Struts1.2

plz help me.

Srinivas.R

2
Contributors
1
Reply
2
Views
9 Years
Discussion Span
Last Post by stultuske
0

don't go to the see for a bath, if you have a perfect shower at home :)

you are making it way to hard on yourself.
all you need to use is the system properties, which you can find by
(either)
Properties props = System.getProperties();
or, for your problem:
String user = System.getProperty("user.name");

off course, there are these bozo's, who feel the need to (manually) change the username in their windows os, and then running app, just to bug the hell out of the developer. In case you would want possibilities as that to be covered as well, you might want to check out the JAAS Login Utility. never used it myself, so you might want to ask our good pal Google for some more explanation

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.