tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <ja...@miweb.es>
Subject JDBC Realm
Date Mon, 15 Oct 2001 18:16:27 GMT
I'm having problem getting JDBC Realm configured.
I've read the JDBCRealm How-TO twice but couldn't get it.

I need to password protect a web app - "Secret"
I have the following:

$CATALINA_HOME/webapps/Secret

And I add the following to the $CATALINA_HOME/conf/server.xml

...
<Server>
...
<Context path="/Server" docBase="Secret" debug="0" reloadble="true">
<Realm className="org.apache.catalina.realm.JDBCRealm" debug="9"
driverName="org.gjt.mm.mysql.Driver"
connectionURL="jdbc:mysql://localhost/secret_users?
user=test&password=abc" userTable="users" userNameCol="names"
userCredCol="passwd" userRoleTable="users_role" roleNameCol="role" />
</Context>
...

mySQL database (secret_users)
create users ( names varchar(15), passwd varchar(15),
primary key(users_id))
create users_role ( names varchar(15),
role varchar(15),
primary key(users_id, role))

I shutdown tomcat and started it.
Now, only the stuff under $CATALINA/webapps/ROOT will work.
The rest including $CATALINA/webapps/examples will return a
503 This application is not currently available.

I'm using jakarta-tomcat-4.0-b7 on Redhat Linux 7.0

Where is wrong?

Thanks, James



Mime
View raw message