Maddy.Shik
Maddy.Shik

Reputation: 6787

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

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 watch 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?

Upvotes: 3

Views: 1905

Answers (1)

BalusC
BalusC

Reputation: 1108852

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>

Upvotes: 7

Related Questions