Tomcat 7
为/conf/context.xml
中Context
节点增加属性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.xml
中Context
节点增加子节点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)无效