症状:

在 ROOT/ 下建立一个软连接文件
ln -s /etc/rc.d/ ./rc
再到rc软连接目录里建立个 aa.html
在访问这个aa.html时就出错。。

HTTP Status 404 - rc /aa.html
--------------------------------------------------------------------------------

type Status report

message rc/aa.html

description The requested resource (/aa.html) is not available.
--------------------------------------------------------------------------------

Apache Tomcat/5.5.15



问题:

tomcat把ln -s 建立的文件不认为是目录。。所以提示不存在
怎么办?

 

解答:

Tomcat 默认是不允许软连接的。在 <Context />; 里面加上 allowLinking="true" 属性就可以了。