2017-03-31

TOMCAT自訂共用library目錄

常常TOMCAT裡的apps都會共用一些library,而通常的做法是直接丟到${catalina.base}/lib裡面去,不過有時在搬移網站時,常常就會忘了哪些是自已新增的lib.jar了 XDD
因此可以另外建一個目錄來放自已的共用jar library。譬如先建一個common-lib專放自已共用的jar:

修改/conf/catalina.properties的shared.loader or common.loader屬性,新增路徑:
shared.loader="${catalina.base}/common-lib","${catalina.base}/common-lib/*.jar","${catalina.home}/common-lib","${catalina.home}/common-lib/*.jar"
...或
common.loader="${catalina.base}/lib","${catalina.base}/lib/*.jar","${catalina.home}/lib","${catalina.home}/lib/*.jar"

沒有留言:

張貼留言