Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 37541 invoked from network); 8 Feb 2005 03:35:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 8 Feb 2005 03:35:34 -0000 Received: (qmail 21165 invoked by uid 500); 8 Feb 2005 03:35:19 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 21140 invoked by uid 500); 8 Feb 2005 03:35:19 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 21126 invoked by uid 99); 8 Feb 2005 03:35:19 -0000 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=HTML_MESSAGE,HTML_TEXT_AFTER_BODY,HTML_TEXT_AFTER_HTML,NO_REAL_NAME X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from wip-ectls-mx1.wipro.com (HELO wip-ectls-mx1.wipro.com) (203.101.113.37) by apache.org (qpsmtpd/0.28) with ESMTP; Mon, 07 Feb 2005 19:35:17 -0800 Received: from wip-ectls-mx1.wipro.com (localhost.localdomain [127.0.0.1]) by localhost (Postfix) with ESMTP id A79B8220377 for ; Tue, 8 Feb 2005 09:05:23 +0530 (IST) Received: from blr-ec-bh2.wipro.com (blr-ec-bh2.wipro.com [10.200.50.92]) by wip-ectls-mx1.wipro.com (Postfix) with ESMTP id 97DA522007D for ; Tue, 8 Feb 2005 09:05:23 +0530 (IST) Received: from blr-ec-msg04.wipro.com ([10.200.53.99]) by blr-ec-bh2.wipro.com with Microsoft SMTPSVC(6.0.3790.211); Tue, 8 Feb 2005 09:05:17 +0530 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C50D8F.329A2120" Subject: RE: isUserInRole Date: Tue, 8 Feb 2005 09:06:27 +0530 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: RE: isUserInRole Thread-Index: AcUNL4cFApPv7vqpQi2fyil9BRV3LwAXo+QgAAAfXVgAABzMwA== From: To: X-OriginalArrivalTime: 08 Feb 2005 03:35:17.0818 (UTC) FILETIME=[357399A0:01C50D8F] X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C50D8F.329A2120 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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... =0D =0D Joby Joseph Wipro Technologies=0D Plot No.72, KEONICS Electronics City, Hosur Main Road, Bangalore- 560 100. India Tel:+91-80-28520408; 51221111 Extn:82332 www.wipro.com=0D =0D -----Original Message-----=0D From: Denny Lee [mailto:dennylee60@yahoo.com]=0D Sent: Monday, February 07, 2005 9:40 PM=0D To: tomcat-user@jakarta.apache.org=0D Subject: RE: isUserInRole=0D Hello Joby,=0D My problem is not getting user name and logging in but=0D rather I can't get the user's role using the function=0D isUserInRole(). For whatever reason isUserInRole=0D always returns a false. I tried=0D isUserInRole("admin"), isUserInRole("Administrarors"),=0D isUserInRole("Users") but I get false for all of them.=0D =0D I am trying to restrict some web pages to only allow=0D administrator access. I can't put the user name and=0D role in an xml file or using a database because of my=0D company's security policy. I have to get the data=0D from NTLM.=0D Thanks again for your help.=0D ________________________________________________=0D Forwarded Message=0D Subject: RE: isUserInRole=0D Date: Mon, 7 Feb 2005 08:46:40 +0530=0D From: joby.joseph1@wipro.com=0D To: tomcat-user@jakarta.apache.org=0D Plain Text Attachment [ Download File | Save to my=0D Yahoo! Briefcase ]=0D =0D Hi Denny,=0D To get user name... do as follows...=0D <%@ page import=3D"java.security.Principal" %>=0D And use in ur code as...=0D <% Principal p =3D request.getUserPrincipal();=0D out.println(p.getName()); %>=0D will print the name of the current user...=0D =0D Joby Joseph=0D Wipro Technologies=0D Plot No.72, KEONICS Electronics City,=0D Hosur Main Road,=0D Bangalore- 560 100. India=0D Tel:+91-80-28520408; 51221111 Extn:82332=0D www.wipro.com=0D ---------------------------------------------------------------------=0D To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org=0D For additional commands, e-mail: tomcat-user-help@jakarta.apache.org=0D Confidentiality Notice=0D 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= Mailadmin@wipro.com immediately and destroy all copies of this message and any attachments. ------_=_NextPart_001_01C50D8F.329A2120--