Friday, March 24, 2006

Disabling Directory Browsing / File listing in Jboss

By default directory browsing /file listing is in 'enable' state in Jboss configuration.

Problem: If at all the directory browsing is enable, the user who is browsing your website can see the files list in the subfolders and able to access the files which ever he can see in the page.

To disable Directory browsing / file listing go through the modifications mentioned below

Files to Modify: web.xml
Location of File: Locate it in ..../deploy/jbossweb-tomcatXXX.sar/conf/
(*Note - Tomcat version may change depeding on the version of Jboss)

Modifications:
Before -
listings
true


After -
listings
false

Lets Rock

2 comments:

Anonymous said...

Thanks! Spot on!

Anonymous said...

Works great.

The path is:
-install dir-\jboss-4.2.2.GA\server\default\deploy\jboss-web.deployer\conf\web.xml

if you are using the jboss deployer.