tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Milt Epstein <>
Subject RE: [urgent!] Disabling the context's content listing
Date Thu, 16 May 2002 15:09:06 GMT

The original poster doesn't indicate which version of Tomcat they are
using -- how this is done is version-specific.  "This" being disabling
directory listings/indexes -- and usually there is a more specific way
to do it than using a welcome file.  For example, with Tomcat 4.0.X,
there is a way to configure it in the default server-wide web.xml file
(so it applies to all contexts/applications), and it can be overridden
on a per context/application basis (in each context/application's
web.xml file).  It's documented pretty well in the server-wide web.xml
file -- you set the listings init-param for the default servlet to the
appropriate value.  For other versions of Tomcat, I suggest checking
the archives of this list.  Here's a good place to do that:

Look for tomcat-user in the list of apache lists.  You might also look
through the comments in the server-wide configuration files that come
with your version of Tomcat.

On Thu, 16 May 2002, Vaneet Sharma wrote:

> nancy
>   look below
> this is web.xml
> add the welcome-file-list to your web.xml file
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <!DOCTYPE web-app
>     PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>     "">
> <web-app>
> <welcome-file-list>
>     <welcome-file>index.html</welcome-file>
>       </welcome-file-list>
> </web-app>
> -----Original Message-----
> Fro: Nancy Crisostomo Martinez []
> Sent: 16 May 2002 15:45
> To: Tomcat Users List
> Subject: [urgent!] Disabling the context's content listing
> Hi!
> Does anybody know how to disable the content of a context listing?
> I mean, when you try to load a JSP file you must type the following URL:
> http://address:8080/contextname/file.jsp
> But when you type http://address:8080/contextname all the list of jsp,
> gif, jpg files are showed and even you can download the file thru the
> right button of your mouse with ("Save target as...")...
> It would be right if instead of the listing, a "Forbidden" or "Not
> Found" page appears, wouldn't it?
> So, could you help me to disable this kind of access?
> I'll appreciate all your advice!!!
> Thank you in advance!
> Nancy.
> --
> To unsubscribe, e-mail:
> <>
> For additional commands, e-mail:
> <>
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

Milt Epstein
Research Programmer
Systems and Technology Services (STS)
Campus Information Technologies and Educational Services (CITES)
University of Illinois at Urbana-Champaign (UIUC)

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message