> > From: Wojtek Kusch <[EMAIL PROTECTED]> > Date: 2006/12/19 Tue AM 11:52:20 EST > To: users@tomcat.apache.org > Subject: JDBCRealm > > Hallo! > > I am a newbie. I am defining a JDBCRealm for my web application in the > server.xml: > > <Realm className="org.apache.catalina.realm.JDBCRealm" > driverName="sun.jdbc.odbc.JdbcOdbcDriver" > connectionURL="jdbc:odbc:CATALINA" > userTable="USER" userNameCol="username" > userCredCol="userpass" > userRoleTable="USER_ROLE" roleNameCol="role" /> > Wojtek, I'm a newbie too. I think that if you want to use this realm for a specific application, you should delete it from your server.xml and create a context.xml file in the META-INF folder inside your webapp's directory. Using the docs, here's one I created for MySQL which works. This will override the global user database (which is still in your server.xml) specifically for your app. <?xml version="1.0" encoding="UTF-8"?> <Context crossContext="true" reloadable="true"> <Realm className="org.apache.catalina.realm.JDBCRealm"> connectionName="superman" connectionPassword="loislane" connectionURL="jdbc:mysql://localhost/authority" driverName="org.gjt.mm.mysql.Driver" roleNameCol="role_name" userCredCol="user_pass" userNameCol="user_name" userRoleTable="user_roles" userTable="users"/> </Context> Of course, you'll need to change the driver and connection information and then restart tomcat. Let me know if this helps. > --------------------------------------------------------------------- > To start a new topic, e-mail: users@tomcat.apache.org > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
--------------------------------------------------------------------- To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]