eclipse-ee4j / eclipse-ee4j/jersey
ContextHandler doesn't work when using JettyHttpContainerFactory creates Jetty server.
- Dominant language
- Java
- Stars
- 730
- Forks
- 382
- PR merge metrics
- No merged PRs in 30d
Description
When upgrading jersey version to 2.22.x, ContextHandler which sets the context path doesn't work any more for Jetty server created by JettyHttpContainerFactory.
On 2.21, when hitting resource path "/hello" it works well. But on 2.22.x, hitting the resource path will return 404 not found. So far the only way I found it to add the context path to the resource path.
I will add a small maven project for demonstration. Step to reproduce:
* Checkout and build the project. You should see the test works well
* Run AppTest, test works well.
* Or run App class as java application, open [http://localhost:8080/test/hello](http://localhost:8080/test/hello). You should be able to see a simple content.
* Switch the jersey version to 2.22 or 2.22.1 in pom.xml.
* re-run AppTest, you will see the test fails with 404\. Or re run App and go the the url above. You will see a 404 returns.
#### Affected Versions
[2.22, 2.22.1]
Contributor guide
Assessment
This issue has not been assessed yet.