tomcat 對軟連接的支持

打開tomcat對軟連接的支持。

 

 tomcat默認不支持軟連接,需要爲Context 增加allowLinking="true"。

Tomcat 4:

Xml代碼
  1. <Context path="/test" docBase="/usr/local/pjt/images">  
  2.   <Resources className="org.apache.naming.resources.FileDirContext" allowLinking="true"/>  
  3. </Context>  
 

 Tomcat 7/6/5:   

Xml代碼
  1. <Context path="/test" docBase="/usr/local/pjt/images" allowLinking="true"/>  

 

Tomcat 8:   
Xml代碼
  1. <Context path="/test" docBase="/usr/local/pjt/images">  
  2.   <Resources allowLinking="true"/>
  3. </Context>  
 
發佈了60 篇原創文章 · 獲贊 29 · 訪問量 47萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章