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

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 added this to To do in Jetty 10.0.9/11.0.9 (FROZEN) via automation 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 <gregw@webtide.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
@joakime joakime moved this from To do to In progress in Jetty 10.0.9/11.0.9 (FROZEN) Mar 16, 2022
Jetty 10.0.9/11.0.9 (FROZEN) automation moved this from In progress to Done Mar 22, 2022
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 <gregw@webtide.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
@gregw
Copy link
Contributor

gregw commented Mar 22, 2022

Needs merging to 12.

@gregw gregw reopened this Mar 22, 2022
Jetty 10.0.9/11.0.9 (FROZEN) automation moved this from Done to In progress Mar 22, 2022
@gregw gregw added this to To do in Jetty 12.0.ALPHA1 via automation Mar 22, 2022
@gregw gregw moved this from In progress to Done in Jetty 10.0.9/11.0.9 (FROZEN) 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 <gregw@webtide.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
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 <gregw@webtide.com>
gregw added a commit that referenced this issue Apr 4, 2022
+ fixed cpyright headers

Signed-off-by: Greg Wilkins <gregw@webtide.com>
gregw added a commit that referenced this issue Apr 5, 2022
+ Updated UriTemplatePathSpec.java

Signed-off-by: Greg Wilkins <gregw@webtide.com>
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 <gregw@webtide.com>
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 <gregw@webtide.com>
@joakime joakime added this to To do in Jetty 9.4.47 - 🧊 FROZEN 🥶 via automation Apr 5, 2022
@joakime joakime added this to To do in Jetty 10.0.10/11.0.10 - 🧊 FROZEN 🥶 via automation Apr 5, 2022
@joakime joakime moved this from To do to In progress in Jetty 10.0.10/11.0.10 - 🧊 FROZEN 🥶 Apr 5, 2022
@joakime joakime moved this from To do to In progress in Jetty 9.4.47 - 🧊 FROZEN 🥶 Apr 5, 2022
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 <gregw@webtide.com>
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 <gregw@webtide.com>
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 <gregw@webtide.com>
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
Jetty 12.0.ALPHA1 automation moved this from To do to Done Apr 7, 2022
Jetty 9.4.47 - 🧊 FROZEN 🥶 automation moved this from In progress to Done Apr 7, 2022
Jetty 10.0.10/11.0.10 - 🧊 FROZEN 🥶 automation moved this from In progress to Done Apr 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 <gregw@webtide.com>
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
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
2 participants