aspose file tools
The moose likes Servlets and the fly likes How do u find out the client username? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "How do u find out the client username?" Watch "How do u find out the client username?" New topic
Author

How do u find out the client username?

Dean Fredericks
Ranch Hand

Joined: Dec 04, 2004
Posts: 60
Ive set up security in my web.xml, and server.xml

I see the method req.isUserInRole(),

But what I really want is the calling clients username.

How do I get this??

Thanks
Dean


PLEASE WATCH THIS VIDEO: <a href="http://www.glumbert.com/media/dolphin" target="_blank" rel="nofollow">http://www.glumbert.com/media/dolphin</a><br /> <br /><-- that video is no joke. Spread the word... this cant go on!!!<br /> <br />SCJP 1.4, SCBCD 1.3, SCWCD 1.4, SCMAD 1.0
Alec Lee
Ranch Hand

Joined: Jan 28, 2004
Posts: 568
"request.getRemoteUser()" is that what you want?
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35240
    
    7
Try req.getUserPrincipal().getName().


Android appsImageJ pluginsJava web charts
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How do u find out the client username?
 
Similar Threads
Help:: how can I do the base64 encoding?
splitting a string
user authentication with speech recognition
Checking with Querystring
Error in invoking a servlet from an applet (loaded in a browser)