tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefán F. Stefánsson <>
Subject webapp icons, disabling directory listings, and <error-page> tags in web.xml
Date Tue, 27 Feb 2001 12:40:02 GMT

I was wondering if anyone knows if the <icon> element in web.xml is not
working in Tomcat (it's not working for me... just wondering if it's not
supported or if it's something specific with me).

Another thing (a little more important) is the <welcome-file-list>
element.  I have one such in my web.xml and it contains one
<welcome-file> element.  This is directly from it:


This should redirect anyone going to https://localhost/ to
llerServlet.  This is not the case however since it's not happening.
Instead I'm getting the directory listing of the root of the webapp (I
don't have an index file).

Now I have two questions:
1) Why doesn't my welcome-file-list thing work?
2) How can I disable the directory listing?  I want people to see the
"not found" or "not authorized" rather than getting the directory

One final thing (web.xml is _very_ poorly documented... btw, I _have_
searched for answers to my questions and haven't found anything to this
thing I'm asking about here ;o).

Can someone explain to me the <error-page> tag in web.xml?  I want an
error page for my servlets as well as the JSPs.  I've put the <%@ page
errorPage="error.jsp" %> in all of them but I'm wondering what to do
with the servlets...  I think it might have something to do with the
<error-page> tag in web-xml but the documentation says that it takes in
an error code (such as 404).  Another place says it takes the fully
qualified name of a java exception class.  Can I use the error.jsp file
for these things too?  Will that page have access to the exception
object to get the message I want to display?
I'm talking about it looking like this in web.xml:


Thanks in advance for any and all answers,

kind regards, Stefan

Stefan Freyr Stefansson
Software Developer
deCODE Genetics, Inc.

Phone: (+354) 570 2854
GSM:   (+354) 861 1718
Fax:   (+354) 491 3782
 <<Stefan Stefansson.vcf>> 

View raw message