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,