Tomcat: How to get user identity from http header

I have setup serveral user in the tomcat-users.xml file in the server so that everytime user are required to login to the system.  However how can find the login user in the http header? Which attribute it used to store the login username ?
Who is Participating?
petmagdyConnect With a Mentor Commented:
Try this from your Jsp or servlet:

String loginInUser = request.getRemoteUser();
jabbaaAuthor Commented:
It works for me..thanks!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.