【转】tomcat 访问软连接文件夹下的网页出现404错误,description The requested resource (/xxx.html) is not available.

      在 tomcat/webapps/ROOT/ 下建立一个软连接文件
ln -s /home/ubuntu/report report
    再到report软连接目录里建立个 report.html
通过浏览器访问这个report.html时就出错。。

错误如下:

HTTP Status 404 - report/report.html
--------------------------------------------------------------------------------

type Status report

message rc/aa.html

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

Apache Tomcat/5.5.15

      在网上查找了一些资料,终于找到一个可实施的解决方法(http://suchalin.blog.163.com/blog/static/55304677201062644027477/):

修改:tomcat/conf/context.xml,在<Context>中增加 allowLinking="true",如下:

<Context allowLinking="true">

<!-- Default set of monitored resources -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>

</Context>

      修改完成后,保存,然后重启下tomcat就ok了!

 

posted @ 2014-11-17 10:44  天涯雪  阅读(4950)  评论(0编辑  收藏  举报