tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: Requesting / hangs Tomcat with no static interceptor?
Date Sat, 18 Nov 2000 00:48:48 GMT
Jon Skeet wrote:

> I'm using Tomcat 3.2b7 (also happens under 3.2b6) and I'm trying to run
> a slightly cut-down version. In particular, I don't want to serve any static
> files, show any directories etc.
>
> I thought that to do this, I could remove the line:
>
> <RequestInterceptor className="org.apache.tomcat.request.StaticInterceptor" />
>
> from server.xml.
>
> Unfortunately, this seems to mean that a request for / on the server sends
> Tomcat into a tight loop (Java takes up 99% of my CPU).
>
> Any ideas? Is removing the StaticInterceptor just a really bad idea?
>
> Win2K, JDK1.3 btw.
>

The static interceptor also interprets requests for welcome files (which is what
you really want to have happen when you ask for URL "/"), so removing it is
probably not a good idea :-).

In 3.2b7 there is a configuration option on the static interceptor to disable
directory listings.  The default entry looks like this:

    <RequestInterceptor
        className="org.apache.tomcat.request.StaticInterceptor"
        debug="0" suppress="false" />

Change the suppress attribute to true, and Tomcat will return an error instead of
a directory listing when no welcome file is present.

>
> Jon

Craig McClanahan



Mime
View raw message