Re: Can I set up 2 realms for the same server so I can access 2 databases

2003-06-19 Thread vtobin
Hi,

 Actually Angus' comment isn't really true.  You just configure a seperate
 Realm under each of your Hosts, and Tomcat should do exactly what you
 want.

Thanks for that info, Bill.  I had set up database access in each individual 
context, but trying to do that with the jdbc realm didn't seem to work.  So, 
if I move the one appliction into another virtual host, then I could make 
authentication application specific, if I understand you right.  

Thanks again for giving me a direction to explore.

Regards,

Val
 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Can I set up 2 realms for the same server so I can access 2 databases

2003-06-18 Thread Val T.
Hi,

I've got two sites set up on one server, and I am trying to set up security
for each of them.  They use 2 different databases.  Is it possible to set
things up in the server.xml the way I have below, or do I have to put all
users in the same database?  I can't find anything on the Web that deals
with this issue.

Realm roleNameCol=RoleID userCredCol=Password
className=org.apache.catalina.realm.JDBCRealm
  userTable=tblUSERS debug=99
  userRoleTable=tblUSERROLES userNameCol=Username

connectionURL=jdbc:mysql://localhost/DB1?user=MyNameamp;password=MyPW
 driverName=com.mysql.jdbc.Driver /

  Realm roleNameCol=RoleID userCredCol=Password
className=org.apache.catalina.realm.JDBCRealm
  userTable=tblUSERS debug=99
  userRoleTable=tblUSERROLES userNameCol=Username

connectionURL=jdbc:mysql://localhost/DB2?user=MyNameamp;password=MyPW
 driverName=com.mysql.jdbc.Driver /

Thank you for any help.

Val


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can I set up 2 realms for the same server so I can access 2 databases

2003-06-18 Thread Angus Mezick
According to the spec, you can have 0 or 1 realms configured.  Now, if
you want to rewrite the code that uses the realms for logging people in
I think you can use 2 DB's.

 -Original Message-
 From: Val T. [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, June 18, 2003 2:40 PM
 To: Tomcat Users List
 Subject: Can I set up 2 realms for the same server so I can 
 access 2 databases
 
 
 Hi,
 
 I've got two sites set up on one server, and I am trying to 
 set up security
 for each of them.  They use 2 different databases.  Is it 
 possible to set
 things up in the server.xml the way I have below, or do I 
 have to put all
 users in the same database?  I can't find anything on the Web 
 that deals
 with this issue.
 
 Realm roleNameCol=RoleID userCredCol=Password
 className=org.apache.catalina.realm.JDBCRealm
   userTable=tblUSERS debug=99
   userRoleTable=tblUSERROLES userNameCol=Username
 
 connectionURL=jdbc:mysql://localhost/DB1?user=MyNameamp;pass
 word=MyPW
  driverName=com.mysql.jdbc.Driver /
 
   Realm roleNameCol=RoleID userCredCol=Password
 className=org.apache.catalina.realm.JDBCRealm
   userTable=tblUSERS debug=99
   userRoleTable=tblUSERROLES userNameCol=Username
 
 connectionURL=jdbc:mysql://localhost/DB2?user=MyNameamp;pass
 word=MyPW
  driverName=com.mysql.jdbc.Driver /
 
 Thank you for any help.
 
 Val
 
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Can I set up 2 realms for the same server so I can access 2 databases

2003-06-18 Thread Angus Mezick
Yup, as I read further, it looks like you would need to write your own
realm class that will talk to both DB's for you.  Sounds like a mess.
--Angus

 -Original Message-
 From: Angus Mezick 
 Sent: Wednesday, June 18, 2003 2:49 PM
 To: Tomcat Users List
 Subject: RE: Can I set up 2 realms for the same server so I 
 can access 2 databases
 
 
 According to the spec, you can have 0 or 1 realms configured.  Now, if
 you want to rewrite the code that uses the realms for logging 
 people in
 I think you can use 2 DB's.
 
  -Original Message-
  From: Val T. [mailto:[EMAIL PROTECTED] 
  Sent: Wednesday, June 18, 2003 2:40 PM
  To: Tomcat Users List
  Subject: Can I set up 2 realms for the same server so I can 
  access 2 databases
  
  
  Hi,
  
  I've got two sites set up on one server, and I am trying to 
  set up security
  for each of them.  They use 2 different databases.  Is it 
  possible to set
  things up in the server.xml the way I have below, or do I 
  have to put all
  users in the same database?  I can't find anything on the Web 
  that deals
  with this issue.
  
  Realm roleNameCol=RoleID userCredCol=Password
  className=org.apache.catalina.realm.JDBCRealm
userTable=tblUSERS debug=99
userRoleTable=tblUSERROLES userNameCol=Username
  
  connectionURL=jdbc:mysql://localhost/DB1?user=MyNameamp;pass
  word=MyPW
   driverName=com.mysql.jdbc.Driver /
  
Realm roleNameCol=RoleID userCredCol=Password
  className=org.apache.catalina.realm.JDBCRealm
userTable=tblUSERS debug=99
userRoleTable=tblUSERROLES userNameCol=Username
  
  connectionURL=jdbc:mysql://localhost/DB2?user=MyNameamp;pass
  word=MyPW
   driverName=com.mysql.jdbc.Driver /
  
  Thank you for any help.
  
  Val
  
  
  
 -
  To unsubscribe, e-mail: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  
  
 
 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 
 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can I set up 2 realms for the same server so I can access 2 databases

2003-06-18 Thread Val T.
- Original Message -
From: Angus Mezick [EMAIL PROTECTED]
To: Tomcat Users List [EMAIL PROTECTED]
Sent: Wednesday, June 18, 2003 2:48 PM
Subject: RE: Can I set up 2 realms for the same server so I can access 2
databases


According to the spec, you can have 0 or 1 realms configured.  Now, if
you want to rewrite the code that uses the realms for logging people in
I think you can use 2 DB's.

Thank you for the info.  I think I'll set up one database for logging in.

Val




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Can I set up 2 realms for the same server so I can access 2 databases

2003-06-18 Thread Bill Barker
Actually Angus' comment isn't really true.  You just configure a seperate
Realm under each of your Hosts, and Tomcat should do exactly what you
want.

Angus Mezick [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
According to the spec, you can have 0 or 1 realms configured.  Now, if
you want to rewrite the code that uses the realms for logging people in
I think you can use 2 DB's.

 -Original Message-
 From: Val T. [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, June 18, 2003 2:40 PM
 To: Tomcat Users List
 Subject: Can I set up 2 realms for the same server so I can
 access 2 databases


 Hi,

 I've got two sites set up on one server, and I am trying to
 set up security
 for each of them.  They use 2 different databases.  Is it
 possible to set
 things up in the server.xml the way I have below, or do I
 have to put all
 users in the same database?  I can't find anything on the Web
 that deals
 with this issue.

 Realm roleNameCol=RoleID userCredCol=Password
 className=org.apache.catalina.realm.JDBCRealm
   userTable=tblUSERS debug=99
   userRoleTable=tblUSERROLES userNameCol=Username

 connectionURL=jdbc:mysql://localhost/DB1?user=MyNameamp;pass
 word=MyPW
  driverName=com.mysql.jdbc.Driver /

   Realm roleNameCol=RoleID userCredCol=Password
 className=org.apache.catalina.realm.JDBCRealm
   userTable=tblUSERS debug=99
   userRoleTable=tblUSERROLES userNameCol=Username

 connectionURL=jdbc:mysql://localhost/DB2?user=MyNameamp;pass
 word=MyPW
  driverName=com.mysql.jdbc.Driver /

 Thank you for any help.

 Val


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]