【轉】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了!

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM