kenp21@gmail.com said:
>The databse I have setup I have one table called users... it have the
>userID password, and role. Should I have the role column in its own
>table as the tomcat documentation proposes and relate the two by PK and
>FK?
Looks like the documentation is pretty clear on this:
: JDBCRealm is an implementation of the Tomcat 5 Realm interface that looks
: up users in a relational database accessed via a JDBC driver. There is
[quoted text clipped - 20 lines]
: specified in the users table).
: o Role name of a valid role associated with this user.
In short, two tables are needed - one with username and password columns,
and another with username and role columns. In the first table, there must
be only one row per each user; in the second table there can be any number
of rows (including zero!) per each user.
The username is the factor Tomcat uses to correlate information in the two
tables.
For convenience of any other software that might access this data, you could
also consider a PK/FK relation (FK on the roles table referring to a PK on
the users table), but Tomcat wouldn't even see this.

Signature
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
kenp - 01 May 2006 15:53 GMT
The problem turned out to be that I was running an instance of tomcat
via the eclipse ide. After deploying my war and starting the catalina
service, the lookup was successful. I did not need to create two
tables. Of course, in my production environment, I will setup the
databse and server as per the documentation. But, for development
purposes I did not need to create two tables.