tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 34637] New: - Servlet Mapping validation doesn't comply to Servlet 2.4 spec
Date Tue, 26 Apr 2005 20:21:14 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34637>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34637

           Summary: Servlet Mapping validation doesn't comply to Servlet 2.4
                    spec
           Product: Tomcat 5
           Version: 5.5.9
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: bcoleman@atg.com


The Servlet spec v2.4 states that following with regard to mappings:

SRV.11.2 Specification of Mappings

In theWeb application deployment descriptor, the following syntax is used to
define mappings:

· A string beginning with a ‘/’ character and ending with a ‘/*’ suffix is used
for path mapping.
· A string beginning with a ‘*.’ prefix is used as an extension mapping.
· A string containing only the ’/’ character indicates the "default" servlet of
the application. In this case the servlet path is the request URI minus the
context path and the path info is null.
· All other strings are used for exact matches only.

The class org.apache.catalina.core.StandardContext validates the URL in
addServletMapping().  It calls the method validateURLPattern() and always throws
an exception if validateURLPattern() returns false.  Unfortunately, the
validateURLPattern() only returns true if the pattern starts with "/" or "*.". 
This satisfies the first 3 requirements from the spec, but not the 4th. Any
string that doesn't begin with "/" or "*." should be matched exactly.

Because of this Tomcat5 does not comply to the Servlet 2.4 spec.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message