As Alan says, my purpose would be to query the database all the roles that it
contains. But i can´t do that if i don´t know what database an application
uses. So, my question is how can i know what database does an application
use? Maybe if i could know which realm the application is using, i could
access to the database. But how can i do this??

Thank you for all your help!!


mgainty wrote:
> 
> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Application-Realm-in-Tomcat-tp15334971p15343799.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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