You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by kikibobo <eb...@boboco.ie> on 2007/01/07 14:19:53 UTC

/, welcome files, and 404

Hi,

I've got a spring 2 webmvc based webapp deployed on Tomcat 5.5.20 that is
exhibiting some curious behaviour.  Call my application "myapp", deployed as
an exploded directory.

What I am seeing is that when I hit http://myhost/myapp/, I get a 404, but
if I hit http://myhost/myapp/index.html, it works.

It seems like hitting /myapp/ should trigger the welcome file, which
includes index.html.  Explicitly adding index.html to the welcome file list
in web.xml doesn't fix things.

Stepping through DefaultServlet.java in a debugger, what seems to be
happening is Tomcat thinks I want to do a directory listing, but I have
directory listings disabled, so it returns a 404 instead.  I can't figure
out where the welcome file logic gets triggered, so I'm a bit stuck.

Can anyone help?

Thanks,
Eric
-- 
View this message in context: http://www.nabble.com/-%2C-welcome-files%2C-and-404-tf2934488.html#a8204265
Sent from the Tomcat - User mailing list archive at Nabble.com.


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


RE: /, welcome files, and 404

Posted by "Caldarale, Charles R" <Ch...@unisys.com>.
> From: kikibobo [mailto:ebowman@boboco.ie] 
> Subject: /, welcome files, and 404
> 
> I've got a spring 2 webmvc based webapp deployed on Tomcat 
> 5.5.20 that is exhibiting some curious behaviour.

I have a vague recollection that you have to configure welcome files
within spring, rather than within Tomcat, since spring essentially maps
everything in a webapp to its own dispatcher.  However, I'm not a spring
developer, so my memory could easily be faulty on that point.

> I can't figure out where the welcome file logic gets
> triggered

The welcome file settings are translated into servlet mapping rules -
there's no explicit code in DefaultServlet for them.  The welcome file
set is constructed in StandardContext.java, and then passed off to
org/apache/tomcat/util/http/mapper/Mapper.java for retention and
processing.

 - 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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org