Stephane,

On 8/1/21 11:17, Stephane wrote:
I'm trying to distinguish catalina_home from catalina_base and I use a
JDBCRealm and soon will probably use other realms.

Don't use JDBCRealm. Instead, use DataSourceRealm. It's a long story, but DataSourceRealm is what you want for production and JDBCRealm is more of a toy.

They are configured very similarly.

I read the documentation, mentioning JDBC driver needs to be in
catalina_home/lib. I don't understand why as catalina.properties
specify common.loader
as "${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.hom
e}/lib","${catalina.base}/lib/*.jar"
>
> Can someone explain ?

common.loader includes both catalina.base/lib/*.jar and catalina.home/lib/*.jar, so it doesn't matter whether you put it in one place of the other.

I prefer using catalina.base for *everything* because it means that your catalina.home is never polluted with stuff that didn't come from the original tarball. The only changes I ever make to the extracted-contents of the tarball are to sometimes change some file permissions.

My recommendation would be to put your JDBC driver library in catalina.base/lib

I also tried to modify catalina.properties (to test with
server.loader) but as soon as I have the file in catalina_base (even
empty), the server doesn't start at all
(java.lang.ClassNotFoundException:
org.apache.catalina.startup.Catalina).

Can someone help on this too ?

Do you have the library in multiple places?

I wouldn't mess-around with catalina.properties unless you absolutely have to. Every default in there makes a *LOT* of sense.

Hope that helps,
-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to