How to enable directory listing of static content in JBoss EAP 7

Solution Verified - Updated -


  • How do I enable directory listing in EAP 7?
  • I would like to enable directory listing for the application which is deployed in EAP 7. I was able to do this with EAP 6.4 using the following CLI. What is the equivalent configuration in EAP 7?

  • I enabled the following custom file handler in undertow subsystem to serve static contents from the specific path in EAP 7, but the directory listing feature is not enabled for this. How do I enable the directory listing feature for this file handler?

    <subsystem xmlns="urn:jboss:domain:undertow:4.0">
        <server name="default-server">
            <http-listener name="default" socket-binding="http" ... />
            <host name="default-host" alias="localhost">
                <location name="/" handler="welcome-content" />
                <location name="/example" handler="example-file-handler" /> <!- added this -->
            <file name="welcome-content" path="${jboss.home.dir}/welcome-content" />
            <file name="example-file-handler" path="/path/to/example/static-contents" /> <!- added this -->


  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In