On Thu, 19 Sep 2002, Turner, John wrote:

> Wait, I think something got lost.
>
> If the browsable directories are all new and prgrammatically
> generated, and the non-browsable directories are static, then either
> of the two methods already posted would work.
>
> - Tim Funk's suggestion to write a filter to intercept requests for
> non-browsable directories
> - George Sexton's suggestion to just stick an index.html file in the
> non-browsable directories (with a refresh of 0 to a homepage)
>
> A third option would be to use Apache in front of Tomcat and
> restrict access that way, then you wouldn't even have to deal with
> the requests.  More cimplicated, though.  From your comments, it
> seems like the number of non-browsable directories is much smaller
> than the potential number of browsable directories, so it would seem
> to me that either of the two solutions posted would work nicely.

Besides all this, I think something else got lost.  I believe you
*can* configure listings on a per-webapp/context basis.  You just take
the entire definition of the default servlet out of the server-wide
web.xml (in the conf sub-directory), copy it to the particular
webapp's/context's web.xml, and change the listings parameter as
desired.

The comments near the top of the server-wide web.xml are:

  <!-- This document defines default values for *all* web applications -->
  <!-- loaded into this instance of Tomcat.  As each application is    -->
  <!-- deployed, this file is processed, followed by the               -->
  <!-- "/WEB-INF/web.xml" deployment descriptor from your own          -->
  <!-- applications.                                                   -->

I think this means you can have things in the particular
webapp's/context's web.xml override things in the server-wide one.

Should be quick and easy to test at least.


> > -----Original Message-----
> > From: adi [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, September 19, 2002 10:07 AM
> > To: Tomcat Users List
> > Subject: RE: How to block listings on a SPECIFIC directory
> >
> >
> > these directories contain text files that should be avalable
> > for users while
> > browsing the directory
> >
> > -----Original Message-----
> > From: Sexton, George [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, September 19, 2002 2:31 PM
> > To: Tomcat Users List
> > Subject: RE: How to block listings on a SPECIFIC directory
> >
> >
> > Do you put static content in these directories?
> >
> > -----Original Message-----
> > From: adi [mailto:[EMAIL PROTECTED]]
> > Sent: 19 September, 2002 7:26 AM
> > To: Tomcat Users List
> > Subject: RE: How to block listings on a SPECIFIC directory
> >
> >
> > new directories are being created dynamically and they should
> > be browsable.
> > all the rest shouldnt be
> > thats why I can not put index.htm file in every directory
> > Any suggestions?
> >
> > Adi
> >
> > -----Original Message-----
> > From: Sexton, George [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, September 19, 2002 2:21 PM
> > To: Tomcat Users List
> > Subject: RE: How to block listings on a SPECIFIC directory
> >
> >
> > Hmmm... Why don't you put a file like "index.html" in the directory?
> > Assuming you have a welcome files list in your web.xml file,
> > this will be
> > displayed. You can then put up a message, and re-direct to
> > where you want
> > them to be.
> >
> > George Sexton
> > MH Software, Inc.
> > Home of Connect Daily Web Calendar Software
> > http://www.mhsoftware.com/connectdaily.htm
> > Voice: 303 438 9585
> >
> >
> > -----Original Message-----
> > From: adi [mailto:[EMAIL PROTECTED]]
> > Sent: 19 September, 2002 6:49 AM
> > To: [EMAIL PROTECTED]
> > Subject: How to block listings on a SPECIFIC directory
> >
> >
> > Hello,
> >
> > I am trying to enable listing on one directory ( and its children)
> > only.
> > the listings parameter set to false or true will affect everything.
> > is it possible in any way to define "listings" to individual
> > directories in
> > my webapp?
> >
> > Adi

Milt Epstein
Research Programmer
Integration and Software Engineering (ISE)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)
[EMAIL PROTECTED]


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to