Tomcat共享lib文件夹

时间:2017-03-31 07:57:53

标签: java tomcat

我有一个不包含lib jar的war文件。我在lib文件夹下创建共享文件夹,将所有jar文件放入其中,并更新catalina.properties文件。它在我的Mac上运行,但不在centos7服务器上运行。我检查了centos7 tomcat日志,它显示找不到log4j,但jar是在share文件夹中。还有什么其他可以检查的地方?

感谢

catalina.properties

   shared.loader="${catalina.base}/lib/share","${catalina.base}/lib/share/*.jar","${catalina.home}/lib/share","${catalina.home}/lib/share/*.jar"

tomcat 8.5.8

1 个答案:

答案 0 :(得分:0)

这是我自己的错误,添加到../conf/context.xml文件中,antiResourceLocking =" false"特权=#&34;真"应该删除!

正确的样本:

 <Context>

<!-- Default set of monitored resources. If one of these changes, the    -->
<!-- web application will be reloaded.                                   -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>

<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->
</Context>