This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes NT User name of the client (IE) using JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "NT User name of the client (IE) using JSP" Watch "NT User name of the client (IE) using JSP" New topic
Author

NT User name of the client (IE) using JSP

ajay chaturvedi
Greenhorn

Joined: Jul 31, 2002
Posts: 16
Hi,
I need to get NT User name from the browser.
I do this using following line of ASP code.
request.servervariables("LOGON_USER")
How do i do this in JSP.
if it is not possible to get NT User name from JSP, how do i get from other source like JAVA API or something else
[ August 01, 2002: Message edited by: achaturvedi ]
Shawn Bayern
Author
Ranch Hand

Joined: May 06, 2002
Posts: 160
Originally posted by achaturvedi:
Hi,
I need to get NT User name from the browser.
I do this using following line of ASP code.
request.servervariables("LOGON_USER")
How do i do this in JSP.
if it is not possible to get NT User name from JSP, how do i get from other source like JAVA API or something else

Remember, ASP is specific to Microsoft, so it gives you direct access to Microsoft-specific things, like the currently logged-in NT user. To do this portably in Java, you probably want to get the JVM's "current user", which you can do using the System property "user.name". That is, in JSP:
<%= System.getProperty("user.name") %>
Hope that helps,


Shawn Bayern<br />"JSTL in Action" <a href="http://www.jstlbook.com" target="_blank" rel="nofollow">http://www.jstlbook.com</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: NT User name of the client (IE) using JSP
 
Similar Threads
Retrieving Win NT Users using Java / ADSI Programming in Java
getting the user name in windows NT
NT domain login and password
Retrieving WinNT Users, UserPassword, UserGroups in Java
How to get client NT ID from JSP