File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Can I get a userid from Windows Authenication from a JSP

 
Rich Barry
Greenhorn
Posts: 19
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I was wondering if there was a way for a JSP page to get the userid from a users windows login???
Is this possible??
Thx,
Rich
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Complicated. The answer is 'no', except when the answer is 'yes'...
If a user is logged on to their person computer and visits the JSP, you cannot get the name that they logged in as.
However, you can (in some servers like WebSphere) get the JSP to authenticate against the windows login - but all this functionality is driven from the server side. If the JSP is secured, (BASIC or FORM based authentication), the first time they ask for the page they will be challenged for a username and password. These details can be validated against the server. After that the userid is available via request.getRemoteUser()
Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic