tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Denny Lee <>
Subject RE: isUserInRole
Date Mon, 07 Feb 2005 16:10:03 GMT
Hello Joby,
My problem is not getting user name and logging in but
rather I can't get the user's role using the function
isUserInRole().  For whatever reason isUserInRole
always returns a false.  I tried
isUserInRole("admin"), isUserInRole("Administrarors"),
isUserInRole("Users") but I get false for all of them.

I am trying to restrict some web pages  to only allow
administrator access.  I can't put the user name and
role in an xml file or using a database because of my
company's security policy.  I have to get the data
from NTLM. 

Thanks again for your help.

Forwarded Message
Subject:	RE: isUserInRole
Date:	Mon, 7 Feb 2005 08:46:40 +0530

Plain Text Attachment [ Download File | Save to my
Yahoo! Briefcase ]

Hi Denny,

To get user name... do as follows...
<%@ page import="" %>
And use in ur code as...
<% Principal p = request.getUserPrincipal();
     out.println(p.getName()); %>
will print the name of the current user...

Joby Joseph
Wipro Technologies
Plot No.72, KEONICS Electronics City,
Hosur Main Road,
Bangalore- 560 100. India
Tel:+91-80-28520408; 51221111  Extn:82332

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message