Hello,

I'm well aware how to globally enable or disable directory listings within
Tomcat (by modifying the "listings" parameter of the "default" servlet).
However, I don't know how to set this up correctly context-by-context.
Here's what I've tried:

- copying the <servlet> and <servlet-mapping> elements "as-is" from the
"global" web.xml to the web.xml of a particular context.  This doesn't work,
as the context is not initialised due to the duplicate servlet definition.

- copying the <servlet> and <servlet-mapping> elements from the "global"
web.xml to the web.xml of a particular context, but changing the name in
both elements to "default2".  The context starts, but the servlet is never
invoked (the default global servlet seems to intercept and process the
request, because the request is handled as expected from the global web.xml,
but not according to the params of the context's web.xml).

I don't want to remove the "global" definition of the "default" servlet,
because that becomes somewhat tedious if I've got to copy it to each context
I deploy.  This is also unsuitable when I wish to deploy a WAR file, as I
have to unpack it and modify it's web.xml.  Furthermore, I can't leave the
"default" servlet's definition in any redistributable webapp that I create,
because it's not guaranteed that the implementing class
("org.apache.catalina.servlets.DefaultServlet") will be available on other
servlet version, or if the class is the same version.

How can I achieve the desired configuration?

Thanks in advance,
-Chris B.



--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to