Automatically generated directory listings are not what you probably want to have enabled on a production server, but for a development box they do come in handy. If you are running Railo server edition packaged with Resin you may be wondering how to enable Directory Listings on your development box. That is the subject of this post. By default Resin comes pre-configured to enable directory listings, but this setting is missing in the version of Resin server that is packaged with Railo, at list the beta 3.1 version which was available at the time of this writing.
Adding this capability back in is quite simple. You must modify the resin.conf file which is installed in the conf directory of the Railo install directory. I’m on a Mac and I installed Railo in a directory under Applications so my path to the Resin.conf file is /Applications/Railo/conf/resin.conf. Fire up your favorite editor and open up this file. Find the <web-app-default> block and add the following code to it:
<servlet servlet-name="directory" servlet-class="com.caucho.servlets.DirectoryServlet"/>
Now all you have to do is restart Resin and you should now have directory listings enabled.