7 Replies Latest reply on Aug 5, 2003 7:52 AM by Jon Barnett

    dynamic directory listings

    garyg Novice

      Does JBoss have the dynamic directory listings capability as in Apache. Like, if I pointed a link to a directory w/ no index.html, Apache would return a directory listing of all it's contents (configurable in httpd.conf w/ links and all).

      TIA,

        • 1. Re: dynamic directory listings
          anandan Newbie

          hi,

          How to disable the Directory Listings in Jboss/Tomcat bunndle.usualy this can be done in web.xml .

          Isany specific setting is available in jboss/Tomcat bundle?

          thanks
          vijay

          • 2. Re: dynamic directory listings
            Jon Barnett Master

            In Jetty and Tomcat bundled with JBoss, the respective configuration files still apply. These are server/instance/deploy/jbossweb-jetty.sar/webdefault.xml and server/instance/deploy/jbossweb-jetty.sar/web.xml respectively.

            In the Jetty configuration (webdefault.xml), look at the line:
            <init-param>
            <param-name>dirAllowed</param-name>
            <param-value>true</param-value>
            </init-param>

            If true, and index.jsp, index.html or index.htm do not exist in the directory, the listing will be shown.

            In the Tomcat configuration (web.xml), look for the line:
            <init-param>
            <param-name>listings</param-name>
            <param-value>true</param-value>
            </init-param>

            Set it according to your needs.

            • 3. Re: dynamic directory listings
              Paul Newbie

              Hi,

              I have been using JBoss 2.4.4 bundled with Tomcat 4.0.1 and have been able to browse directories that are symbolic links. I am now migrating to JBoss 3.2.1 with Tomcat 4.1.24 and have found that I can no longer access the symbolic linked directories. Is there a configuration parameter to allow this like the Apache FollowSymLinks option?

              Thanks for any help.

              Cheers,
              Paul.

              • 4. Re: dynamic directory listings
                Paul Newbie

                After some investigation I have found the following details on how to enable following of symbolic links in tomcat:

                http://archives.real-time.com/pipermail/tomcat-devel/2003-June/053111.html

                http://marc.theaimsgroup.com/?l=tomcat-user&m=105159411609623&w=2

                The problem is that it refers to settings in the server.xml file which is not present in the Jboss - Tomcat bundle. Where can I set these properties?

                Cheers,
                Paul.

                • 5. Re: dynamic directory listings
                  Jon Barnett Master

                  Have a look at the server/instance/deploy/jbossweb-tomcat.sar/META-INF/jboss-service.xml. It may also be located in a SAR called jbossweb-tomcat41.sar apparently.

                  Normally, this would be implemented like this.

                  <!-- Default context parameters -->





                  However, I do not think that JBoss currently provides rules to support these elements - I don't remember seeing them in the relevant parts of the source. They are also not contained in the DTD.

                  The SAX parser will check the XML elements and report that there are no rules to support Context or Resources in server.log if you have DEBUG as your log limit. There may be issues of managing deployment as JBoss is in control of part of this process at least, and this would probably be the reason it is not implemented. Perhaps this might change in the future.

                  The other thing to note is that this feature was disabled by default in Tomcat because of security concerns.

                  • 6. Re: dynamic directory listings
                    Paul Newbie

                    Thanks for the prompt reply!

                    I have tried your recommendation, and like you said, it does not look to be supported in the current version. Do you have any idea when this feature would be supported?

                    Cheers,
                    Paul.

                    • 7. Re: dynamic directory listings
                      Jon Barnett Master

                      I'm not sure there are any plans to support this. There may be plumbing issues that prevent it. I suppose you could log a request at the JBoss SourceForge site.