• Post Reply Bookmark Topic Watch Topic
  • New Topic

Display User's Login Name from Client Machine's Environment Variable

 
Jean John
Greenhorn
Posts: 24
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have a requirement to display the name of the user who enters my jsp page by getting the username from the client's environment variables. Is this possible to do in my jsp page using java/javascript?


For eg: if ABC is the user who clicks on the link, i need to display Welcome ABC.
if XYZ is the user who clicks on the link, i need to display Welcome XYZ.

I tried using but it displays the server machine's username and not the client machine's.
Please help.

Thanks,
Jean
 
Vicky Vijay
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can your provide the below information,

Do you have login screen for your application ??

If yes,

You can access the User information from the User related tables

 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65530
108
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jean John wrote:I tried using but it displays the server machine's username and not the client machine's.

Of course. Servlets and JSP execute on the server.


 
Jean John
Greenhorn
Posts: 24
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to identify the user trying to login from his machine's environment variable(windows os) rather than asking the user to enter the information. Is that possible in jsp?
 
Jean John
Greenhorn
Posts: 24
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Guru Vijay wrote:Can your provide the below information,

Do you have login screen for your application ??

If yes,

You can access the User information from the User related tables




I don't have a login screen.
I need to identify the user trying to login from his machine's environment variable(windows os) rather than asking the user to enter the information. Is that possible in jsp?

Thanks,
Jean
 
Paul Clapham
Sheriff
Posts: 21892
36
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not in JSP, no. It runs on the server, as already mentioned in this thread, so naturally it couldn't get anything from the client system. However a signed applet would be able to access that data.
 
Ravi Majety
Ranch Hand
Posts: 59
Eclipse IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi John,

Just check this weblink which might be useful your requirement.

http://spnego.sourceforge.net/

The above project useful to make use of windows authentication for webapplications.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!