1 Reply Latest reply on Sep 5, 2006 10:57 AM by Jimmy Wilson

    Directory Listing

    mike golan Newbie

      Hello everybody..

      i have a quistion :
      how can i avoid directory listing in my App.. i mean when i go to
      http://localhost:8080/somedir/index.jsp i get the start page but what i want is that
      when i go to
      http://localhost:8080/somedir/otherdir then should be dent to start site and avoid to list all directorys under "otherdir"....

      please help me

        • 1. Re: Directory Listing
          Jimmy Wilson Apprentice

          Inside the $JBOSS_HOME/server/xxx/deploy/jbossweb-tomcat55.sar/conf directory, edit the file named web.xml. Inside that file search for the default servlet and change the value for the listings parameter to false. Its declaration, as it appears in that file, is shown below.

           <servlet>
           <servlet-name>default</servlet-name>
           <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
           <init-param>
           <param-name>debug</param-name>
           <param-value>0</param-value>
           </init-param>
           <init-param>
           <param-name>listings</param-name>
           <param-value>true</param-value>
           </init-param>
           <load-on-startup>1</load-on-startup>
           </servlet>