tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Mixon" <rnmi...@qwest.net>
Subject RE: Two Virtual Hosts
Date Mon, 07 Aug 2006 04:03:51 GMT
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;amp;useUnico
de=true&amp;amp;characterEncoding=utf-8"
                removeAbandoned="true"
          removeAbandonedTimeout="60"
                    logAbandoned="true"
      />
  </Context>


 

-----Original Message-----
From: Li [mailto:ampyx.li@gmail.com] 
Sent: Sunday, August 06, 2006 8:45 PM
To: Tomcat Users List; rnmixon@qwest.net
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 <rnmixon@qwest.net> 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:ampyx.li@gmail.com]
> 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: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
> ---------------------------------------------------------------------
> 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
>
>


--
When we invent time, we invent death.


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


Mime
View raw message