tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Morrissey <>
Subject Possible bug in servlet mapping - versions later than 5.5.12
Date Tue, 02 May 2006 19:19:13 GMT

I'm looking for some advice on whether to post what appears to be a bug 
in the Tomcat BugZilla. I found this in v5.5.17, reproduced it in 
v5.5.16, and haven't been able to reproduce it in v5.5.12 or earlier.

I have a Struts application with mappings for files in the root folder 
and in various subfolders. It appears that requests for any (virtual) 
file in any subfolder is not being passed through to the Struts 
ActionServlet, instead Tomcat is looking in the appropriate place on the 
file system for a file named (for example) "/subfolder/", and 
returning a 404 error. Requests for pages in the root (e.g. "/") 
work normally. This only happens when I am accessing the application 
using a domain name that is mapped to a Host element other than the 
default localhost.

Steps to reproduce:

1. Add an entry in your hosts file to map a domain name to your local 
machine (e.g.
2. Download and unzip the Tomcat 5.5.17 binary distribution 
( from
3. Download Struts 1.2.9 ( from and copy struts-examples.war 
into Tomcat's webapps folder
4. Add the following lines after the </Host> line in conf/server.xml:
            <Host name="" debug="0" 
                unpackWARs="true" autoDeploy="true">
                <Context path="" docBase="" debug="0"/>
5. Start Tomcat using startup.bat
6. Browse to http://localhost:8080/struts-examples/ and click Taglib 
Test Pages. A list of tag names should be returned.
7. Browse to and click Taglib Test 
Pages. A 404 (/exercise/ should be returned. Note the root 
/ is served normally.

(Test machine: Win XP SP2, JDK1.5)

I've used the struts-examples webapp to demonstrate this for simplicity. 
I have found the same with my own applications.

Has anyone else experienced this problem, and should it be logged in 
BugZilla? My apologies if this bug has appeared before or is not a bug 
at all!

Kind regards,
Dave Morrissey

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

View raw message