This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan 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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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>
 
Don't get me started about those stupid light bulbs.
 
subject: NT User name of the client (IE) using JSP
 
Similar Threads
How to get client NT ID from JSP
Retrieving Win NT Users using Java / ADSI Programming in Java
getting the user name in windows NT
Retrieving WinNT Users, UserPassword, UserGroups in Java
NT domain login and password