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>
精彩评论