This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

get client username with servlet

 
Keith Lockey
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have made a signed applet that retrieves the username with System.getProperties. I am trying to make this application for thin clients using JSP and Java Servlets, so I was wondering if there is a way to get a client username without using an applet.
Thanks,
Keith
 
Scott Duncan
Ranch Hand
Posts: 365
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are out of luck there, I think. The JSPs and servlets are running on the server whereas your applet is running on the client's JRE. You can get quite a lot of user information but not that. I could be wrong but I know I tried this about a year and a half ago and could never find the solution.
 
Dana Hanna
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One option is to create a "dummy" applet that is not visible. It gets the username, puts it in a form field, and that gets posted to the server.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic