eclipse-ee4j / eclipse-ee4j/jersey
Undetermined behaviour with @ApplicationPath
- Dominant language
- Java
- Stars
- 730
- Forks
- 382
- PR merge metrics
- No merged PRs in 30d
Description
Hi, after deploying a Jersey 3.1.3 webapp using @ApplicationPath, without referencing the application class in web.xml, the registered resources for this application might sometimes be undetermined (using Tomcat 10.1 container).
For me it seems to be a timing issue during startup of an webapp, possibly related with the mechamism of automatic adding of Servlets as mentioned in https://eclipse-ee4j.github.io/jersey.github.io/documentation/3.1.3/deployment.html: "If no such Servlet is defined to handle the custom Application subclass, Jersey dynamically adds a Servlet with a fully qualified name equal to the name of the provided Application subclass.".
Possible workaround: Replace @ApplicationPath in the application class with an approriate entry in web.xml (as described in the docs).
See more details here: https://stackoverflow.com/questions/76779528/undetermined-registration-of-resources-while-migrating-to-jersey-3-1-x
Contributor guide
Assessment
This issue has not been assessed yet.