2009-11-13 48 views
2

我想,以防止從Tomcat的URL時在目錄結尾的目錄列表中的文件。這就像對的.htaccess Apache的。從一個目錄中列出文件防止Tomcat的/ Jboss的

這樣當用戶瀏覽到: www.test.com/f_apps/ - 沒有什麼是lised或錯誤信息 但要: www.test.com/f_apps/welcome.jsp - 正常工作

我認爲這是一個變化META-INF/context.xml的,但我還是新到Tomcat的東西,所以不知道如何修改它的這種變化。

回答

0

http://linux-sxs.org/internet_serving/c581.html,你可以更新web.xml做到這一點:

This is the first section in web.xml. The options that concern us are : 

<init-param> 
    <param-name>listings</param-name> 
    <param-value>true</param-value> 
</init-param> 

Change <param-value> to false and you turn off directory listing. It is that simple. 
相關問題