tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject DO NOT REPLY [Bug 52530] New: Incorrectly accept many url-pattern on a single servlet-mapping in web.xml
Date Wed, 25 Jan 2012 21:29:39 GMT

             Bug #: 52530
           Summary: Incorrectly accept many url-pattern on a single
                    servlet-mapping in web.xml
           Product: Tomcat 5
           Version: 5.5.26
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Unknown
    Classification: Unclassified

Dear tomcat developers,
I need to map the same servlet on two different url. I used netbeans 7.0.1 for
managing my whole project, so I used its friendly interface to modify the
web.xml file. What netbeans created is this:


This is read by tomcat 5.5 without emitting any error, but only the second
pattern works, while the first one is ignored.

Googling I found that the right way for tomcat 5.5 is this one:


And this seems to be right way because tomcat 5.5 is bound to Servlet 2.4.

Spec for Servlet 2.5, on note SRV.19.0.3 titled Ā«Multiple Occurrences of
Servlet MappingsĀ», says:

    Previous versions of the servlet schema allows only a single url-pattern or
servlet name per servlet mapping. For servlets mapped to multiple URLs this
results in needless repetition of whole mapping clauses.

So, I think tomcat 5.5 should emit an error for this broken web.xml file.


Configure bugmail:
------- You are receiving this mail because: -------
You are the assignee for the bug.
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message