We help IT Professionals succeed at work.
Get Started

How do I allow directory listing for specific web applications in JBoss 5.1.0?

Last Modified: 2013-12-02
Hi Experts

I have two applications deployed on a JBoss 5.1.0.
The primary application is deployed in jboss/server/default/deploy/advisor.war and it shouldn't have directory listings enabled, which isn't an issue as JBoss disables dir listings per default.
The secondary application is deployed (exploded) in an external folder and is used only for serving images, documents and animations to the primary application.

I need to have directory listings enabled for the second application as a search engine needs to crawl the folders looking for files to add to its index.

Directory listings can be enabled/disabled globally in server/default/deployers/jbossweb.deployer/web.xml using the "listings" init-param but I need to be able to override that for only one application.

I've tried putting the "default" servlet definition found in server/default/deployers/jbossweb.deployer/web.xml into the war files web.xml but JBoss tells me that it cannot add the servlet as a servlet with the name default already exists.
Changing the name of the default servlet in the applications web.xml yields no result.

Anyone know how to do this?


Watch Question
This problem has been solved!
Unlock 1 Answer and 1 Comment.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE