6 Replies Latest reply on Jan 14, 2020 12:52 PM by hari 2020

    Wildfly Directory listing

    hari 2020 Newbie

      Hi,

      We recently facing an issue with directory listing in wildfly.  We have a directory on linux server where all the project related files are placed.  As par to client requirement  in our application, we provided a link that will show up the file in a specific directory. Right now when user clicks  on link, directory content is showing but there is a parent directory is displaying on screen that redirects to all other directories that they do not to see.

      Eg:   MainDirectory

                   Directory1

                      File1

                  Direcotry2

                     File2

      Support if link in the application is to File2 then on screen , above the File2 a folder icon is coming and this will redirect to a screen where all directories in MainDirectory is displayed.

      I understood this is all from wildfly configuration that we did in standalone.xml but not sure how to remove/stop that parent directory navigation.

      Attached a screenshot for reference.

       

      our standalon.xml code looks like this

       

                      <host name="default-host" alias="localhost">

                          <location name="/" handler="welcome-content"/>

                         <location name="/archive" handler="AHandler"/>

                      </host>

                      <handlers>

                      <file name="welcome-content" path="${jboss.home.dir}/welcome-content"/>

                      <file name="AHandler" path="/MainDirectory/" directory-listing="true" follow-symlink="true"/>

                      </handlers>

       

       

      Please suggest.