Am Mon, 07 Apr 2008 07:56:14 +0200
schrieb Matthias Fechner <idefix(at)fechner.net>:
> hm, das ist schon klar, aber die Applikation bringt das folgende mit:
> /usr/local/apache-tomcat6.0/webapps/webical/META-INF/context.xml
>
> und wenn ich in diese Datei reinschauen (die ich auch auf meine DB
> angepasst habe), finde ich das folgende:
> <Realm className="org.apache.catalina.realm.JDBCRealm"
> debug="4"
> driverName="com.mysql.jdbc.Driver"
> connectionName="foobar"
> connectionPassword="foobar"
> connectionURL="jdbc:mysql://localhost:3306/webical?autoReconnect=true"
> userTable="_auth_user"
> userNameCol="username"
> userCredCol="userpass"
> userRoleTable="_auth_userrole"
> roleNameCol="role"/>
>
> oder muss ich das dann nochmal in die server.xml unter conf/ eintragen,
> sollte doch damit gehen oder?
afaik gibt es folgende stellen um realms auf context-ebene zu
konfigurieren:
- server.xml ( $TOMCAT_HOME/conf/server.xml )
- $TOMCAT_HOME/conf/context.xml
- zumindest bis tomcat5.x hat es noch das gegeben:
$TOMCAT_HOME/conf/<Engine Name>/<Host Name>/<Context Name>.xml
ich persönlich bevorzuge alles in die server.xml zu tun,
massgeblicher teil sähe in deinem fall in etwa so aus:
[..]
<Host name="localhost" debug="0" appBase="webapps">
<Context path="/webical" docBase="/pfad/zu/webical" >
<Realm className="org.apache.catalina.realm.JDBCRealm"
driverName="com.mysql.jdbc.Driver"
connectionURL="jdbc:mysql://localhost/webical?user=foobar&password=foobar"
userTable="_auth_user" userNameCol="username" userCredCol="userpass"
userRoleTable="_auth_userrole" roleNameCol="role"/>
</Context>
..
[..]
wichtig ist dann noch dass sich der jdbc-treiber
(e.g. mysql-connector-java.jar) in $TOMCAT_HOME/lib befindet.
HTH,
¨reinhard
-- The sweeter the apple, the blacker the core -- Scratch a lover and find a foe! -- Dorothy Parker, "Ballad of a Great Weariness" To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org with "unsubscribe de-bsd-questions" in the body of the messageReceived on Mon 07 Apr 2008 - 13:19:03 CEST