开发者

jsp:how to hide folder structure of website from users?

开发者 https://www.devze.com 2022-12-11 18:07 出处:网络
how to hide folder structure of website from users. i have developed a website on jave platform (jsp).

how to hide folder structure of website from users. i have developed a website on jave platform (jsp). website is deployed on jboss. suppose my website 's home page url is

dummy.com/dummyFolder/dummy1.jsp

user can wa开发者_开发知识库tch all of jsp pages in website by going on url

dummy.com/dummyFolder/

what should i do to prevent user to view my website directory structure?


In the default web.xml of the application server you need to disable the directory listing feature. In case of JBoss AS (specifically: Tomcat) you need to set the DefaultServlet's initialization parameter listings to false:

<init-param>
    <param-name>listings</param-name>
    <param-value>false</param-value>
</init-param>
0

精彩评论

暂无评论...
验证码 换一张
取 消