Return-Path: Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: (qmail 56477 invoked from network); 7 Feb 2008 21:23:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Feb 2008 21:23:27 -0000 Received: (qmail 91681 invoked by uid 500); 7 Feb 2008 21:23:07 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 91662 invoked by uid 500); 7 Feb 2008 21:23:07 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 91651 invoked by uid 99); 7 Feb 2008 21:23:07 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Feb 2008 13:23:06 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Feb 2008 21:22:49 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1JNECg-0004J3-4p for users@tomcat.apache.org; Thu, 07 Feb 2008 13:22:42 -0800 Message-ID: <15343799.post@talk.nabble.com> Date: Thu, 7 Feb 2008 13:22:42 -0800 (PST) From: maux To: users@tomcat.apache.org Subject: Re: Application Realm in Tomcat In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Nabble-From: maux123@wanadoo.es References: <15334971.post@talk.nabble.com> <47AB5EB8.4080708@joedog.org> X-Virus-Checked: Checked by ClamAV on apache.org As Alan says, my purpose would be to query the database all the roles that = it contains. But i can=C2=B4t do that if i don=C2=B4t know what database an ap= plication 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: >=20 > yes..Tough call without knowing what type of realm you will be > implementing > for (specifically would the realm be Memory or JDBC) >=20 > I found this jsp code for which will take the parameters role from the > request /verify / and output encoded string > <% String role =3D request.getParameter("role"); if (role =3D=3D null) ro= le =3D > ""; > if (role.length() > 0) { if (request.isUserInRole(role)) { %> You have > been > granted role <%=3D util.HTMLFilter.filter(role) %> >=20 > <% } >=20 > which will output something like <admin> assuming your are > requesting > admin access >=20 > HTH/ > Martin-- > ----- Original Message ----- > Wrom: YZUNNYCGPKYLEJGDGVCJVTLBXFGGMEP > To: "Tomcat Users List" > Sent: Thursday, February 07, 2008 2:40 PM > Subject: Re: Application Realm in Tomcat >=20 >=20 >> 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: users-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: users-help@tomcat.apache.org >> >> >=20 >=20 > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org > For additional commands, e-mail: users-help@tomcat.apache.org >=20 >=20 >=20 --=20 View this message in context: http://www.nabble.com/Application-Realm-in-To= mcat-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: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org