For username...
java.security.Principal principal =
HttpSession.getRequest().getUserPrincipal();
if( principal!=null )
{
userName = principal.getName();
}
To determine if user is in a specific role...the following call will return
true/false...
HttpSession.getRequest().isUserInRole(rolename);
HTH
Rob
-Original Message-
From: Christopher Molnar [mailto:[EMAIL PROTECTED]
Sent: Monday, July 11, 2005 1:14 PM
To: tomcat-user@jakarta.apache.org
Subject: Remote Username
I have a quick question and hope that someone can point me in the
right direction.
Once I have a user do basic authentication into a realm , how can I
reference the user name and role in the application?
I tried:
String username = req.getRemoteUser();
but all I am getting back is "null".
Thanks,
-Chris
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]