Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
James Byars
Ranch Hand
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64983
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please be sure to ask Tomcat questions in the Tomcat forum. I have moved this post there for you.
 
Tim McGuire
Ranch Hand
Posts: 820
IntelliJ IDE Tomcat Server VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 42
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic