You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by ja...@miweb.es on 2001/10/15 20:16:27 UTC
JDBC Realm
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