troubleshooting Question

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

Avatar of bettemissen
bettemissenFlag for Denmark asked on
Java App ServersJavaWeb Applications
1 Comment1 Solution1542 ViewsLast Modified:
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?



Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 1 Comment.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros