Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting Windows Username in JSP

Status
Not open for further replies.

nikhilr

Programmer
Sep 5, 2002
10
IN
Hi,
New to this tech. I need to get the Windows User name on the login page. i am trying to use request.getRemoteUser() but all the time it is returning me null.
Here is the code i am using.

<html>
<head>
<title>
Get NT User
</title>
</head>
<body bgcolor="#ffffff">
<%
String sUserName;
String sAuthType;
sUserName = request.getRemoteUser();
%>
User Name is <%=sUserName %>
</body>
</html>
 
Unfortunately this is impossible using the standard servlet/JSP APIs and a browser.
 
is there any other way to do it ???
Is it possible to get the name in browser using JavaScript and then pass it to the user as a queryString ???


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top