File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Spring in Action this week in the Spring 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