Discussions

Web tier: servlets, JSP, Web frameworks: How to obtain the Windows user from a JSP page

  1. Hi

    Is there a way to obtain the windows user so I can login the user directly without asking the username and password.

    Thanks in advance
  2. Re: obtaining the Windows user[ Go to top ]

    I don't think that's possible using only JSP. I believe you'll need to execute some code on the client, and that code will probably need to be signed. You may be able to do it by included a signed applet that executes on the client PC and then sends the relevant information to your server. You might also be able to do it with JScript or VBScript. Windows Scripting Host has an object called WSCRIPT.Network which includes a Username property, so if you could access that you could get the user that is logged in.

    Good luck.