tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <joby.jose...@wipro.com>
Subject RE: isUserInRole
Date Tue, 08 Feb 2005 03:36:27 GMT

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:dennylee60@yahoo.com]
Sent: Monday, February 07, 2005 9:40 PM
To: tomcat-user@jakarta.apache.org
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:   joby.joseph1@wipro.com
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: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org





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 Mailadmin@wipro.com
immediately
and destroy all copies of this message and any attachments.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message