yes..Tough call without knowing what type of realm you will be implementing
for (specifically would the realm be Memory or JDBC)

I found this jsp code for which will take the parameters role from the
request /verify / and output encoded string
<% String role = request.getParameter("role"); if (role == null) role = "";
if (role.length() > 0) { if (request.isUserInRole(role)) { %> You have been
granted role <%= util.HTMLFilter.filter(role) %>

<% }

which will output something like &lt;admin&gt; assuming your are requesting
admin access

HTH/
Martin--
----- Original Message -----
Wrom: YZUNNYCGPKYLEJGDGVCJVTLBXFGGMEP
To: "Tomcat Users List" <users@tomcat.apache.org>
Sent: Thursday, February 07, 2008 2:40 PM
Subject: Re: Application Realm in Tomcat


> Via the spec - you can't query all the roles a user has. But you can say
> request.isUserInRole(rolename)
>
> If you *need* access to the realm, things start to get ugly. You need to
>   start coding against Tomcat internal specific classes.
>
> -Tim
>
> maux wrote:
> > Hi,
> > I am doing a Java code. This code have to access to the realm
> > that an application in Tomcat is using, after that the code have to
access
> > to
> > that realm and look for the roles that exist in that database.
> >
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to