zoukankan      html  css  js  c++  java
  • 【转】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了!

  • 相关阅读:
    软件架构阅读笔记04
    软件架构阅读笔记03
    TortoiseGit和intellij idea配置秘钥
    linux关闭在线登录用户
    汉化gitlab
    GitLab服务器搭建
    redis 中如何切换db
    弹性伸缩问题
    Filebeat+Logstash自定义多索引
    logstash
  • 原文地址:https://www.cnblogs.com/tianyaxue/p/4103078.html
Copyright © 2011-2022 走看看