*
The moose likes Tomcat and the fly likes how can I get the user name of the user authenticated by Tomcat in my servlet? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "how can I get the user name of the user authenticated by Tomcat in my servlet?" Watch "how can I get the user name of the user authenticated by Tomcat in my servlet?" New topic
Author

how can I get the user name of the user authenticated by Tomcat in my servlet?

James Byars
Ranch Hand

Joined: Apr 15, 2009
Posts: 42
hi,

if I am using tomcat-users.xml, and I want to get the username in my servlet, can I?

thanks
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60804
    
  65

Please be sure to ask Tomcat questions in the Tomcat forum. I have moved this post there for you.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820


from API for httpServletRequest LINK

getRemoteUser()
Returns the login of the user making this request, if the user has been authenticated, or null if the user has not been authenticated.
James Byars
Ranch Hand

Joined: Apr 15, 2009
Posts: 42
Bear Bibeault wrote:Please be sure to ask Tomcat questions in the Tomcat forum. I have moved this post there for you.


sorry bear, I did not scroll down enough to notice that there is a whole page for Tomcat.

thank you
James Byars
Ranch Hand

Joined: Apr 15, 2009
Posts: 42
Tim McGuire wrote:
from API for httpServletRequest LINK

getRemoteUser()
Returns the login of the user making this request, if the user has been authenticated, or null if the user has not been authenticated.


thanks.

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how can I get the user name of the user authenticated by Tomcat in my servlet?
 
Similar Threads
how can I get username in my web application.
Security question with Tomcat
Favoriate Eclipse Plug-ins
Authentication/Authorization
How to call 3rd party api for User Authentication in a generic way