By default Tomcat and JBoss do not list the files in a directory in a WAR file. So, when you hit a link with a browser and the link is directory where there is no index file, you will not see a list of the files in that directory. You will most likely see a 404 error. This is a good security feature and your production servers as a rule should never list files in a directory via a web request. Now, if your are required to list the files in a directory for development purposes in a browser you need to do the following:
For this entry $JBOSS_HOME is the directory where JBoss resides and $SERVER_INSTANCE is the server configuration you are using (ex. default).
If you want to enable directory listing for all web applications in JBoss go to $JBOSS_HOME/servers/$SERVER_INSTANCE/deploy/jboss-web.deployer/conf/web.xml, find the default servlet configuration and change listings to true:
<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>
If you want to allow directory listing for specific web applications, you need to modify the web.xml of those applications to define its own default servlet. Include the following definition in the web.xml:
<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>