File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes get client username with servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "get client username with servlet" Watch "get client username with servlet" New topic

get client username with servlet

Keith Lockey
Ranch Hand

Joined: Oct 05, 2001
Posts: 48
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,<br />Keith
Scott Duncan
Ranch Hand

Joined: Nov 01, 2002
Posts: 364
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.

No more rhymes! I mean it!<br /> <br />Does anybody want a peanut?
Dana Hanna
Ranch Hand

Joined: Feb 28, 2003
Posts: 227
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.
I agree. Here's the link:
subject: get client username with servlet
jQuery in Action, 3rd edition