-
Notifications
You must be signed in to change notification settings - Fork 106
Fix #20 - add support for <welcome-servlet> #881
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
Re-based and made a couple clarifications to the specification text. No functional change. |
|
Some feedback from the Tomcat community: At the moment, a 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:
If no match is found then for each legacy welcome file and
This does mean two passes of the welcome files are more likely but I think it is closer to the current behaviour whilst fixing the problem this change was intended to fix. I'm currently leaning towards this alternative approach. |
gregw
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, coming at this very late.
I'm not understanding why in the 6.2 descriptor that welcome-file resources can be matched to servlets?
Also, I don't think this well handles the case of '*.jsp', where if a file exists AND there is a servlet mapping, then dispatch to the servlet.
TCK, Javadoc and other updates to follow once the spec language is agreed.
|
This version should:
Pre-compiled JSPs where the original JSP has been removed are handled by the 3rd bullet of the first pass (they will be an exact match to a servlet mapping) index.jsp masking index.do when index.jsp does not exist is handled by:
Fragments inserting new welcome files that are masked by index.do is handled by:
I haven't updated the Javadoc, TCK etc. yet. Once we have agreement on the spec language, I'll update everything else to match. |
|
@gregw Is this any better? |
Implements the solution discussed in #20.
I plan on leaving this open for a week or two for discussion before merging and wouldn't be surprised if changes were required.