Return-Path: Delivered-To: apmail-jakarta-tomcat-user-archive@www.apache.org Received: (qmail 14713 invoked from network); 13 Oct 2003 08:29:30 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 13 Oct 2003 08:29:29 -0000 Received: (qmail 12326 invoked by uid 500); 13 Oct 2003 08:28:41 -0000 Delivered-To: apmail-jakarta-tomcat-user-archive@jakarta.apache.org Received: (qmail 12289 invoked by uid 500); 13 Oct 2003 08:28:41 -0000 Mailing-List: contact tomcat-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Tomcat Users List" Reply-To: "Tomcat Users List" Delivered-To: mailing list tomcat-user@jakarta.apache.org Received: (qmail 12215 invoked from network); 13 Oct 2003 08:28:40 -0000 Received: from unknown (HELO moutng.kundenserver.de) (212.227.126.171) by daedalus.apache.org with SMTP; 13 Oct 2003 08:28:40 -0000 Received: from [212.227.126.207] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1A8y4T-0005Yv-00 for tomcat-user@jakarta.apache.org; Mon, 13 Oct 2003 10:28:53 +0200 Received: from [217.228.245.254] (helo=cyberspaceroad.com) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1A8y4S-00009V-00 for tomcat-user@jakarta.apache.org; Mon, 13 Oct 2003 10:28:53 +0200 Message-ID: <3F8A621B.8050003@cyberspaceroad.com> Date: Mon, 13 Oct 2003 10:28:11 +0200 From: Adam Hardy User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030925 X-Accept-Language: de-de, en, en-us MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Tomcat JDBCRealm And in the web.xml References: <3F89E1C5.8010507@joedog.org> <20031013015911.98344.qmail@web11506.mail.yahoo.com> In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N On 10/13/2003 07:56 AM Bill Barker wrote: > "Caroline Jen" wrote in message > news:20031013015911.98344.qmail@web11506.mail.yahoo.com... > >>Tim: >> >> Before I posted my questions regarding the >>problem that I encountered, I have gone through >> > > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html#Configuring%20a%20Realm > >> As long as I have the JDBCRealm in >>the server.xml, the Tomcat does not accept >> specified in the application's >>web.xml file. And the Tomcat cannot find my >>application. >> >> Following your advice, I moved the Realm >>declaration outside of the declaration into >>the declaration, and my problem is solved. >> >> Nonetheles, you also said "refine the in >>each context where it is needed." I really want the >>JDBCRealm applies to my application only. My question >>is how do I do it? >> > > > If what is below is accurate, then your is configured wrong. It > needs to be: > > ..... /> > > > You should probably also leave e.g. the UserDatabaseRealm configured under > the , so that other Contexts (i.e. admin & manager) have a Realm to > use. By configuring your own Realm under your , it will override > the one defined in the . > > As long as you configure a 'manager' role for the superuser in your realm, then the superuser can happily login to & use admin & manager - if that fits in with the security requirements of course. That's what I do. But then I am project manager, chief developer, webmaster and DBA for my current project (I should say that more often, it makes Monday mornings great! Just don't tell anyone I'm working for myself :) ). >> Currently, my JDBCRealm looks like: >> >> >> >> >className="org.apache.catalina.realm.JDBCRealm" >> debug="99" >>driverName="com.mysql.jdbc.Driver" >>connectionURL="jdbc:mysql://localhost:3306/artimus? >> user=javauser&password=javadude" >>userTable="members" userNameCol="user_name" >> userCredCol="user_password" >>userRoleTable="user_roles" roleNameCol="user_role"/> >> >> >> ................. >> >> >> >> >>--Caroline >> >> >>My configuration in the $TOMCAT_HOME/conf/sever.xml is >>shown below: >> >> >> >> >>>debug="99" >> driverName="com.mysql.jdbc.Driver" >> connectionURL="jdbc:mysql://localhost:3306/artimus >> user=javauser&password=javadude" >> userTable="members" userNameCol="user_name" >> userCredCol="user_password" >> userRoleTable="user_roles" roleNameCol="user_role"/> >> >> >> >> >> >>--- Tim Funk wrote: >> > http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm-howto.html#Configuring%20a%20Realm > >>>-Tim >>> >>>Caroline Jen wrote: >>> >>>>Tim: >>>> >>>> Would you explain "refine the in each >>>>context where it is needed"? >>>> >>>>-Caroline >>>>--- Tim Funk wrote: >>>> >>>> >>>>>Move the Realm declaration outside of the >>> >>> >>> >>>>>declaration into the >>>>> declaration. Or refine the in each >>>>>context where it is needed. >>>>> >>>>>-Tim >>>>> >>>>>Caroline Jen wrote: >>>>> >>>>> >>>>>>My applications behave wierd after I configured >>>>> >>>>>the >>>>> >>>>> >>>>>>JDBCRealm. After experimenting in many different >>>>>>ways, I found that as long as I have the >>> >>>JDBCRealm >>> >>>>>in >>>>> >>>>> >>>>>>the server.xml, the Tomcat does not accept >>>>>> specified in the >>>>> >>>>>application's >>>>> >>>>> >>>>>>web.xml file. Please help me. >>>>>> >>>>>>My configuration in the >>>>> >>>>>$TOMCAT_HOME/conf/sever.xml is >>>>> >>>>> >>>>>>shown below: >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>>>>> >>>>>className="org.apache.catalina.realm.JDBCRealm" >>>>> >>>>> >>>>>>debug="99" >>>>>>driverName="com.mysql.jdbc.Driver" >>>>>> >>>>> >>>>>connectionURL="jdbc:mysql://localhost:3306/artimus >>> >>>>>> user=javauser&password=javadude" >>>>>>userTable="members" userNameCol="user_name" >>>>>> userCredCol="user_password" >>>>>>userRoleTable="user_roles" >>>>> >>>>>roleNameCol="user_role"/> >>>>> >>>>>> >>>>>> >>>>>> -- struts 1.1 + tomcat 5.0.12 + java 1.4.2 Linux 2.4.20 RH9 --------------------------------------------------------------------- To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: tomcat-user-help@jakarta.apache.org