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
From:   [EMAIL PROTECTED]
To:     tomcat-user@jakarta.apache.org

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


Hi Denny,

To get user name... do as follows...
<%@ page import="java.security.Principal" %>
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
www.wipro.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to