tomcat默認不支持軟連接,需要爲Context 增加allowLinking="true"。
Tomcat 4:
- <Context path="/test" docBase="/usr/local/pjt/images">
- <Resources className="org.apache.naming.resources.FileDirContext" allowLinking="true"/>
- </Context>
Tomcat 7/6/5:
- <Context path="/test" docBase="/usr/local/pjt/images" allowLinking="true"/>
Tomcat 8:
- <Context path="/test" docBase="/usr/local/pjt/images">
-
<Resources
allowLinking="true"/>
- </Context>