You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Li <am...@gmail.com> on 2006/08/07 05:00:56 UTC
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
Re: Two Virtual Hosts
Posted by Li <am...@gmail.com>.
hi thanks,
Simply creating two context solved problem. I appreciated you guys' help
On 8/7/06, Hassan Schroeder <ha...@gmail.com> wrote:
> On 8/6/06, Li <am...@gmail.com> wrote:
>
> > The JDBCRealm I defined for deployed one is in server.xml, any idea?
>
> Yes -- read the Fine Manual:
>
> <http://tomcat.apache.org/tomcat-5.5-doc/config/realm.html>
>
> :: which directly addresses your issue :-)
>
> --
> Hassan Schroeder ------------------------ hassan.schroeder@gmail.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
>
>
--
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
Re: Two Virtual Hosts
Posted by Hassan Schroeder <ha...@gmail.com>.
On 8/6/06, Li <am...@gmail.com> wrote:
> The JDBCRealm I defined for deployed one is in server.xml, any idea?
Yes -- read the Fine Manual:
<http://tomcat.apache.org/tomcat-5.5-doc/config/realm.html>
:: which directly addresses your issue :-)
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.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
RE: Two Virtual Hosts
Posted by Richard Mixon <rn...@qwest.net>.
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: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 <rn...@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
Re: Two Virtual Hosts
Posted by Li <am...@gmail.com>.
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 <rn...@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
RE: Two Virtual Hosts
Posted by Richard Mixon <rn...@qwest.net>.
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