tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andy gordon <efha...@yahoo.com>
Subject Re: Question configurung JBDCRealm (Tomcat 5.5.9)
Date Wed, 21 Dec 2005 11:51:19 GMT
Peter, 
   
  If I understand what you described, it looks like your database is ok but your specification
to tomcat is ever so slightly off. Change your server.xml in a way so that the role elements
reference the role table and not users table. 
   
  HTH 
   
  - andy

Peter.Zoche@materna.de wrote:
  Hi all!

I have got a question regarding setup of a JBDCRealm. I read the HOW-TO
on Tomcat homepage, and I am wondering about the database structure.
I have an existing application, and the database it uses has got a table
'users'
with the follwing columns: login, password, roleid,... where the roleid is a
foreign key to the table 'roles' which has columns 'id' and 'rolename'.
It is sufficient for me because every user can only have one role. Is there
a way to use this database structure with JDBCRealm? Or do I have to
add more tables as described in the HOW-TO? My database structure
already contains all information, so it would be overhead to produce an
extra table, I think. I tried the following:

debug="99" driverName="org.postgresql.Driver"
connectionURL="jdbc:postgresql://localhost:5432/
testwebapp?user=login&password=pwd"
userTable="users" userNameCol="login"
userCredCol="password" userRoleTable="users"
roleNameCol="roleid" />

but I got problems on roleNameCol="roleid". How can I get the rolename
from table roles?

Perhaps I missed something, and someone has an idea.

Thanks

Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org

  


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message