Well, I was having trouble because the username and password where not
passed along properly. So instead of passing them in the connectionURL you
can use two extra attributes(connectionName and connectionPassword):
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://127.0.0.1/tomcat"
connectionName="root"
connectionPassword="root"
userTable="users" userNameCol="user_name"
userCredCol="user_pass"
userRoleTable="user_roles" roleNameCol="role_name" />
This belongs in the server.xml file.
Hope it helps...
Roland