Skip to content

Clarify behavior of path mappings #855

@phinjensen

Description

@phinjensen

In Section 12.2 states that, when defining mappings:

A string beginning with a "/" character and ending with a "/*" suffix is used for path mapping.

Later in the Example Mapping Set, the path mapping /baz/* is given for the servlet servlet2, and then the following example is given for incoming path matching:

/baz -> servlet2
/baz/index.html -> servlet2

This would imply that "/whatever/*" should match "/whatever", but the tests (1, 2, 3) don't have a test for this case, and the Javadoc for HttpServletMatching also doesn't include an example for this case.

I'm pretty confident from some testing that Undertow, for example, doesn't implement it the way the spec document describes it, i.e. for the example in the document with "/baz/*", a request to "/baz" would not be directed to servlet2.

Is that how it's supposed to work? If so, should the TCK include tests to make it clear whether an implementation has it right or not?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions