tomcat默认不支持软连接,需要为Context 增加allowLinking="true"
Tomcat 4:
Xml代码:
<Context path="/test" docBase="/data/www">
<Resources className="org.apache.naming.resources.FileDirContext" allowLinking="true"/>
</Context>
Tomcat 5/6/7:
Xml代码:
<Context path="/test" docBase="/data/www" allowLinking="true"/>
Tomcat 8/9:
Xml代码
<Context path="/test" docBase="/data/www">
<Resources allowLinking="true"/>
</Context>
转载于:https://blog.51cto.com/rogerwang/2137439