Skip to content
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

Allow overriding of url-pattern mapping in ServletContextHandler to allow for regex or uri-template matching #7748

Closed
joakime opened this issue Mar 16, 2022 · 3 comments · Fixed by #7614 or #7834
Assignees
Labels
Enhancement Sponsored This issue affects a user with a commercial support agreement

Comments

@joakime
Copy link
Contributor

joakime commented Mar 16, 2022

Target Jetty version(s)
10.0.9

Enhancement Description

The current ServletContextHandler does it's job nicely with regards to Servlet "url-pattern" based lookups of mapped servlets and filters.
But internally our Path Mapping layer (at org.eclipse.jetty.http.pathmap) supports Regex and UriTemplate as well as the original Servlet url-pattern.

Rework ServletContextHandler to allow more sophisticated embedded use of the regex and uri-template options for mapping as well.

@joakime joakime added Enhancement Sponsored This issue affects a user with a commercial support agreement labels Mar 16, 2022
@joakime joakime self-assigned this Mar 16, 2022
@joakime joakime linked a pull request Mar 16, 2022 that will close this issue
joakime pushed a commit that referenced this issue Mar 16, 2022
…xtHandler

+ needed to open up ServletHandler to allow regex mappings

Signed-off-by: Greg Wilkins <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
gregw added a commit that referenced this issue Mar 22, 2022
…xtHandler (#7614)

Added protected method to ServletHandler to allow other servlet mappings (eg regex) in embedded/extended usage

Signed-off-by: Greg Wilkins <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
@gregw
Copy link
Contributor

gregw commented Mar 22, 2022

Needs merging to 12.

@gregw gregw reopened this Mar 22, 2022
@gregw
Copy link
Contributor

gregw commented Apr 4, 2022

We may also need this in a 9.4 release

gregw added a commit that referenced this issue Apr 4, 2022
…xtHandler

+ needed to open up ServletHandler to allow regex mappings

Signed-off-by: Greg Wilkins <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
gregw added a commit that referenced this issue Apr 4, 2022
+ Fix RegexPathSpec pathInfo
+ Test regression option to 93 behaviour

Signed-off-by: Greg Wilkins <[email protected]>
gregw added a commit that referenced this issue Apr 4, 2022
+ fixed cpyright headers

Signed-off-by: Greg Wilkins <[email protected]>
gregw added a commit that referenced this issue Apr 5, 2022
+ Updated UriTemplatePathSpec.java

Signed-off-by: Greg Wilkins <[email protected]>
gregw added a commit that referenced this issue Apr 5, 2022
+ Backport of #7748
+ Fix RegexPathSpec pathInfo
+ Fix UriTemplatePathSpec pathInfo
+ Test regression option to 93 behaviour

Signed-off-by: Greg Wilkins <[email protected]>
gregw added a commit that referenced this issue Apr 5, 2022
+ Backport of #7748
+ Fix RegexPathSpec pathInfo
+ Fix UriTemplatePathSpec pathInfo
+ Test regression option to 93 behaviour

Signed-off-by: Greg Wilkins <[email protected]>
gregw added a commit that referenced this issue Apr 6, 2022
+ Backport of #7748
+ Fix RegexPathSpec pathInfo
+ Fix UriTemplatePathSpec pathInfo
+ Test regression option to 93 behaviour

Signed-off-by: Greg Wilkins <[email protected]>
gregw added a commit that referenced this issue Apr 6, 2022
* Fixes to backport of #7748

+ Backport of #7748
+ Fix RegexPathSpec pathInfo
+ Fix UriTemplatePathSpec pathInfo
+ Test regression option to 93 behaviour

* small optimization

Signed-off-by: Greg Wilkins <[email protected]>
gregw added a commit that referenced this issue Apr 6, 2022
* Fixes to backport of #7748

+ Backport of #7748
+ Fix RegexPathSpec pathInfo
+ Fix UriTemplatePathSpec pathInfo
+ Test regression option to 93 behaviour

* small optimization

Signed-off-by: Greg Wilkins <[email protected]>
gregw added a commit that referenced this issue Apr 6, 2022
@gregw
Copy link
Contributor

gregw commented Apr 6, 2022

Closing as:

  • cherry picked 10 to 9
  • improved in 9
  • cherry picked 9 to 10
  • merged to 11
  • cherry picked to 12
  • manually fixed when cherry-pick to 12 missed the renamed files!

whew!

@joakime joakime closed this as completed Apr 7, 2022
@olamy olamy moved this to Done in Jetty 12.0.ALPHAS Sep 7, 2022
joakime pushed a commit that referenced this issue Oct 6, 2022
…xtHandler (#7614)

Added protected method to ServletHandler to allow other servlet mappings (eg regex) in embedded/extended usage

Signed-off-by: Greg Wilkins <[email protected]>
Signed-off-by: Joakim Erdfelt <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Sponsored This issue affects a user with a commercial support agreement
Projects
None yet
2 participants