解决Tomcat 8 & 9 软链接(Symlinks)无效

Tomcat 7

/conf/context.xmlContext节点增加属性allowLinking="true"即可

<?xml version="1.0" encoding="UTF-8"?>
<Context allowLinking="true">
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource>
    <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
</Context>

Tomcat 8&9

/conf/context.xmlContext节点增加子节点Resources并且添加属性allowLinking="true"即可

<?xml version="1.0" encoding="UTF-8"?>
<Context>
    <Resources allowLinking="true"></Resources>
    <WatchedResource>WEB-INF/web.xml</WatchedResource>
    <WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource>
    <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
</Context>

未经允许不得转载:鹞之神乐 » 解决Tomcat 8 & 9 软链接(Symlinks)无效

赞 (0) 打赏

评论 0

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏