Hi Denny, I don't hav much idea abt NTLM, still...
Hav u stored roles and the associated users in that file. Hav u specified that file as the file which contains user details in server.xml file... Check those things... 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 -----Original Message----- From: Denny Lee [mailto:[EMAIL PROTECTED] Sent: Monday, February 07, 2005 9:40 PM To: [email protected] Subject: RE: isUserInRole 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: [email protected] 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] Confidentiality Notice The information contained in this electronic message and any attachments to this message are intended for the exclusive use of the addressee(s) and may contain confidential or privileged information. If you are not the intended recipient, please notify the sender at Wipro or [EMAIL PROTECTED] immediately and destroy all copies of this message and any attachments.
