Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Issue #10661 Allow jetty api to override servlets and mappings from webdefault #10668
Issue #10661 Allow jetty api to override servlets and mappings from webdefault #10668
Changes from 4 commits
8c50e0b
841115c
1017b3c
46c556e
f5aac57
08aa1c5
57238d7
8a080d4
6a55b44
71418f1
5d69e3e
c5da5ee
789e454
965ebdd
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
If it is valid to change a mapping from a default descriptor... and we allow embedded code to be used instead of a default descriptor, then why isn't it valid to do if the old mapping was from embedded?
I.e. If we define a servlet in embedded it is seen as a default, but a mapping appears to be handled differently?
Not sure exactly what should be done here... but either way probably need to comment to exact reasoning.
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.
If we allow descriptors to override embedded, then a user can never change a mapping that came from the default descriptor. The principle of least surprise says to me that if I define a servlet and mapping in embedded, I would expect those to be honoured, and not obscured by something from the defaults descriptor, which is mostly hidden from users buried inside
jetty-webapp
jar.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.
@agree I think we agree on the action, but disagree on the description. If either a servlet or a mapping is defined by embedded code, then it should not be overridden by the default descriptor, but could be overridden by a normal descriptor.
Said another way, the default for either Servlet or Mapping comes from either embedded or if not set there, then the webdefaults xml. Either default can be overridden by a normal descriptor.
So what I'd like to see is the same logic here as is done for a servlet. If the mapping is already defined and we are the default descriptor and the mapping came from embedded, then skip the current mapping.
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.
Does the latest commit make this any clearer?