Mark,
On 6/25/25 9:58 AM, Mark Thomas wrote:
On 25/06/2025 14:07, Mark Thomas wrote:
<snip/>
I think I need to look at the rules for merging welcome resources.
That might prompt some changes to the PR.
At the moment, a <welcome-servlet> is almost certain to match since it
will likely be using extension mapping making any welcome resources that
follow unnecessary. This might be an issue for web fragments since any
welcome resources defined in a fragment will be added to the end of the
existing list of welcome resources.
Is this a problem? I think probably yes, but would welcome additional
views. If it is an issue, then one way to resolve it would be to change
the mapping algorithm to:
For each welcome resource in the order it appears in the deployment
descriptor:
- append the partial URI to the request URI to create a welcome URI
- if the welcome URI has an exact match to a servlet mapping, send the
request to that servlet
- if the welcome URI has a prefix match to a servlet mapping, send the
request to that servlet
- if a static file exists in the web application for the welcome URI,
send the request to that static resource
If no match is found then for each legacy welcome file and welcome-
servlet in the order they appear in the deployment descriptor:
- append the partial URI to the request URI to create a welcome URI
- if a servlet mapping (other than the default servlet) matches the
welcome URI, send the request to that servlet
Thoughts?
I'll post a similar comment to the PR for feedback too.
I wonder if you should ping Roy Fielding about this. His involvement in
other foundational documents may help here since lots of those other
specs have a history of being (1) insanely complicated and (2) somehow
end up working out in the end. He may have a whole bunch of edge-cases
in his head that are worth considering.
-chris
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org