在 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了!

 

相关文章:

  • 2022-01-29
  • 2021-11-25
  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
  • 2021-09-29
猜你喜欢
  • 2021-06-17
  • 2022-12-23
  • 2021-11-18
  • 2022-12-23
  • 2022-12-23
  • 2021-11-18
  • 2021-07-26
相关资源
相似解决方案