• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Greenhorn
Posts: 24
Android Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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

 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 28177
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 59
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
reply
    Bookmark Topic Watch Topic
  • New Topic