You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Paul Phillips <pa...@partitura.com> on 2002/09/23 02:46:18 UTC

JDBC realm on 4.1.10

I have a server running 4.0.3.  On this server, I implemented a webapp that 
uses a JDBC realm for form based authentication.  The database is mysql. 
It works fine.

The lines in the 4.0.3 server.xml file relative to the JDBC realm look like 
this:

<Realm  className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/xyz?user=me&amp;password=mypassword"
userTable="userTableName" userNameCol="login" userCredCol="password"
userRoleTable="roles" roleNameCol="role" />



So, I decided to give 4.1.10 a try.  I used the admin app included in 
4.1.10 to setup the realm for my context.  When setting up the realm, I did 
not put anything in the digest field in the admin app, since I am sending 
clear text.  However, Tomcat would not restart.  I found that, if this line 
is left blank, the admin app puts:
digest=""
into the server.xml.  This won't parse, so it won't start.  I had to remove 
it by hand.

When I got it to start, the authentication on my webapp won't work.  The 
login screen shows up, then I enter my username and password.  When I 
submit it, the page starts to process, but never goes anywhere.  It doesn't 
time out, doesn't give an error, nothing.  It just sits and tries something 
(I don't know what...).

The relevant lines in the 4.1.10 server.xml (generated by the admin app) 
are:

<Realm className="org.apache.catalina.realm.JDBCRealm" connectionName="me" 
connectionPassword="mypassword" connectionURL="jdbc:mysql://localhost/xyz" 
debug="9"  driverName="com.mysql.jdbc.Driver" roleNameCol="role" 
userCredCol="password" userNameCol="login" userRoleTable="roles" 
userTable="userTableName" validate="true"/>

I have tried a number of variants of the above, all to no avail.  I have 
tried the older mysql driver - no change.

If anybody has any ideas, I would be grateful for the help.

Regards,
Paul Phillips

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>