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 Mon, 07 Feb 2005 03:16:40 GMT

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



-----Original Message-----
From: Denny Lee [mailto:dennylee60@yahoo.com]
Sent: Friday, February 04, 2005 9:20 PM
To: tomcat-user@jakarta.apache.org; Joby Joseph (WT01 - TELECOM SOLUTIONS)
Subject: isUserInRole

Joby,
Thanks for you reply.  I have not tried
request.isUserInRole("Denny").  I was under the
impression that role has to do with being admin or
user.  I can get the user name through the
request.getRemoteUser() but I am still stuck with the
role thing.
___________________________________________________
Subject:	 RE: isUserInRole question
Date:	Fri, 4 Feb 2005 08:35:22 +0530
From:	joby.joseph1@wipro.com
To:	tomcat-user@jakarta.apache.org

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


Hi Denny,



U hav to use request.isUserInRole("Denny") to compare
whether the user
logged in is Denny or not



Joby.



-----Original Message-----
From: Mario Winterer [mailto:mario.winterer@eduhi.at]
Sent: Friday, February 04, 2005 3:13 AM
To: Tomcat Users List
Subject: Re: isUserInRole question



Hi Denny!



Which Realm do you use in server.xml? What are your
web.xml-settings?

Please post your configurations!!!



  Tex



>Hello,

>Thanks for your reply.  When I use IE to bring up the

>page I get a dialogbox asking for user name and

>password.  If I put in a user name and password of a

>user on the workstation I can login.  The page shows

>the correct user name and says that I have

>successfully logged in.  But I get 2 false for the

>isUserInRole statements.  I don't know why that is
the

>case.

>

>Thanks.

---------------------------------------------------------------------
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.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message