Yes, Place the JDBCReal in your context.xml so it applies only to a single context/webapp. For example:
<Context path="/myapp" docBase="myapp" debug="99" reloadable="true" privileged="true" antiResourceLocking="false" antiJARLocking="true" > <Logger className="org.apache.catalina.logger.FileLogger" prefix="stars." suffix=".log" timestamp="true"/> <Realm className="org.apache.catalina.realm.DataSourceRealm" debug="99" dataSourceName="jdbc/myapp" localDataSource="true" userTable="Users" userNameCol="userid" userCredCol="password" userRoleTable="UserRoles" roleNameCol="roleName" /> <Resource name="jdbc/myapp" type="javax.sql.DataSource" auth="Container" maxActive="200" maxIdle="10" maxWait="10000" defaultAutoCommit="true" username="dbuser1" password="dbpassword1" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/myappdb?autoReconnect=true&amp;useUnico de=true&amp;characterEncoding=utf-8" removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true" /> </Context> -----Original Message----- From: Li [mailto:[EMAIL PROTECTED] Sent: Sunday, August 06, 2006 8:45 PM To: Tomcat Users List; [EMAIL PROTECTED] Subject: Re: Two Virtual Hosts Tomcat 5.5.15, OS (Fedora Core 4) The JDBCRealm I defined for deployed one is in server.xml, any idea? On 8/7/06, Richard Mixon <[EMAIL PROTECTED]> wrote: > More information is needed to help. > > What version of Tomcat, what version of your OS. Also, where are you > defining your JDBCReal - in server.xml or in context.xml? > > -----Original Message----- > From: Li [mailto:[EMAIL PROTECTED] > Sent: Sunday, August 06, 2006 8:01 PM > To: Tomcat Users List > Subject: Two Virtual Hosts > > Hi, > > I am having one webapp running on tomcat 5.5. There is a JDBCRealm > configured for form authentication for the webapp. Now I have to > deploy another webapp onto Tomcat but the db table used for auth is > different from the deployed one. > > Is there a possible way of making two different JDBCRealm for > different deployed webapp? > > Or, if the above solution would be impossible, is there any solution > that I can implement 2 different form auth within same tomcat? > > Regards > > --------------------------------------------------------------------- > 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] > > -- When we invent time, we invent death. --------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]