Hi, I'm trying to use JDBCRealm and MySQL to authenticate user in tomcat 4.1. I followed the steps described on http://jakarta.apache.org/tomcat/tomcat-4.1-doc/realm- howto.html#JDBCRealm: I added a user table and a user_roles table in my database (ABCDatabase); I made all necessary columns (user, password, role_name); I downloaded the MySQL driver (mysql-connector-java-3.0.14- production.zip) and put the .jar file into $CATALINA/common/lib; I replaced the realm definition of the server.xml by follow code snippet :
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="99" driverName="org.gjt.mm.mysql.Driver" connectionURL="jdbc:mysql://localhost_IP/ABCDatabase" <!-- * --> connectionName="root" connectionPassword="" userTable="user" userNameCol="login" userCredCol="password" userRoleTable="user_roles" roleNameCol="role_name" /> I created the new user in slide/users/ with the same name and password as in my user table in the mysql server. I can login in http://localhost:8080/admin with this user (he's not in tomcat-users.xml) using IE, but when I use a terminal as jakarta-slide- webdavclient-2.0, I got the follow error message: org.apache.commons.httpclient.URIException: invalid port number I replaced the connectionURL (the line with <!-- * --> ) by all of bellow lines (one by one), but I got the same error. connectionURL="jdbc:mysql://localhost_IP:3306/ABCDatabase" connectionURL="jdbc:mysql://localhost/ABCDatabase" connectionURL="jdbc:mysql://localhost:/ABCDatabase" I remark that there's nothing about JDBCRealm neither JDBC in the login file (/logs/localhost_log.txt). Does someone know what's wrong in my program? should i put something in Domain.xml? Thx and regards Lea --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]