> From: Dan Armbrust [mailto:[EMAIL PROTECTED] 
> Subject: Re: directory listings per webapp

> I made those two changes - but I still don't get any directory listing

What do you get?

Did you restart Tomcat (or insure that the webapp was otherwise
redeployed)?

What version of Tomcat are you using?

To test what's under discussion, I changed webapps/docs/WEB-INF/web.xml
to include the following:

  <servlet>
    <servlet-name>docsListing</servlet-name>
 
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-clas
s>
    <init-param>
      <param-name>debug</param-name>
      <param-value>0</param-value>
    </init-param>
    <init-param>
      <param-name>listings</param-name>
      <param-value>true</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>

  <servlet-mapping>
    <servlet-name>docsListing</servlet-name>
    <url-pattern>/</url-pattern>
  </servlet-mapping>

References to http://localhost:8080/docs/appdev/printer/docs/ now return
a directory listing, whereas before a 404 came back.
 
> Is my path correct for the web.xml file?

Probably not.  You specified a docBase of /dir/foo for the foo webapp,
but appear to have been editing webapps/foo/WEB-INF/web.xml, which is
not where you've told Tomcat the app is deployed.  It's extremely bad
practice to have a directory under the <Host> appBase that's the same as
one for an app with a docBase that points somewhere else.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to