Comments (12)
Jetty 12 is aligned with Jakarta EE 10, whereas Jetty 9 is aligned with Jakarta EE 8.
Jersey 3.1.x is aligned with Jakarta EE 10, whereas Jersey 2.x is aligned with Jakarta EE 8.
Hence, Jersey 2.x supports Jetty 9, Jersey 3.0.x Jetty 11, and Jersey 3.1.5+ Jetty 12.
from jersey.
IMPORTANT: You need to add this to MANIFEST
Jetty-Environment: ee8
from jersey.
@jansupol We wrote a comment at the same time :-)
I'm using Jetty 12 with EE8
from jersey.
@gpfeifer Can you point us to a documentation regarding this MANIFEST tag?
from jersey.
There is no documentation as far as I know. As I wrote in jetty/jetty.project#11315 it took me some hours to find out that this entry is needed. I found this entry in: https://github.com/jetty/jetty.project/tree/jetty-12.0.x/jetty-ee8/jetty-ee8-osgi
from jersey.
I created a PR (#5524). The PR contains a minimalistic example of a working osgi-helloworld-jetty-12-webapp. Unfortunately a automated JUnit test is missing.
from jersey.
Jetty 12 is aligned with Jakarta EE 10, whereas Jetty 9 is aligned with Jakarta EE 8.
Jersey 3.1.x is aligned with Jakarta EE 10, whereas Jersey 2.x is aligned with Jakarta EE 8.
Hence, Jersey 2.x supports Jetty 9, Jersey 3.0.x Jetty 11, and Jersey 3.1.5+ Jetty 12.
This is the chart you need ...
Jetty version | Environment | EE Level | Servlet ver | Servlet namespace |
---|---|---|---|---|
12 | ee10 |
Jakarta EE10 | Servlet 6.0 | jakarta.servlet |
12 | ee9 |
Jakarta EE9 | Servlet 5.0 | jakarta.servlet |
12 | ee8 |
Jakarta EE8 | Servlet 4.0 | javax.servlet |
11 | n/a | Jakarta EE9 | Servlet 5.0 | jakarta.servlet |
10 | n/a | Jakarta EE8 | Servlet 4.0 | javax.servlet |
9 | n/a | Java EE7 | Servlet 3.1 | javax.servlet |
Note: Jetty 12 server has no servlet dependencies anymore.
The various environments in Jetty 12 have the servlet layers (along with other APIs that are also in that EE level)
When EE11 releases, it'll still be Jetty 12, but just a new environment definition called "ee11".
from jersey.
Using your definitions of Jersey versions to EE levels, the extended chart would look like ...
Jetty version | Environment | EE Level | Servlet ver | Servlet namespace | Jersey Version |
---|---|---|---|---|---|
12 | ee10 |
Jakarta EE10 | Servlet 6.0 | jakarta.servlet |
Jersey 3.1.5+ |
12 | ee9 |
Jakarta EE9 | Servlet 5.0 | jakarta.servlet |
Jersey 3.0.x |
12 | ee8 |
Jakarta EE8 | Servlet 4.0 | javax.servlet |
Jersey 2.x |
11 | n/a | Jakarta EE9 | Servlet 5.0 | jakarta.servlet |
Jersey 3.0.x |
10 | n/a | Jakarta EE8 | Servlet 4.0 | javax.servlet |
Jersey 2.x |
9 | n/a | Java EE7 | Servlet 3.1 | javax.servlet |
Not supported |
But that doesn't make sense, as we know you support Jetty 9.
Looking at your codebase.
- https://github.com/eclipse-ee4j/jersey/tree/3.1
- https://github.com/eclipse-ee4j/jersey/tree/3.0
- https://github.com/eclipse-ee4j/jersey/tree/2.0
Ah, Jersey 2.x codebase doesn't support EE8, it supports EE7 (based on it's use of Servlet 2.4/2.5), that's the mistake!
The corrected chart would be ...
Jetty version | Environment | EE Level | Servlet ver | Servlet namespace | Jersey Version |
---|---|---|---|---|---|
12 | ee10 |
Jakarta EE10 | Servlet 6.0 | jakarta.servlet |
Jersey 3.1.x+ |
12 | ee9 |
Jakarta EE9 | Servlet 5.0 | jakarta.servlet |
Jersey 3.0.x |
12 | ee8 |
Jakarta EE8 | Servlet 4.0 | javax.servlet |
Not supported |
11 | n/a | Jakarta EE9 | Servlet 5.0 | jakarta.servlet |
Jersey 3.0.x |
10 | n/a | Jakarta EE8 | Servlet 4.0 | javax.servlet |
Not supported |
9 | n/a | Java EE7 | Servlet 3.1 | javax.servlet |
Jersey 2.x |
from jersey.
Technically speaking, Jersey 2.x supports Eclipse Jetty 7, as that's the version that introduced support for Servlet 2.4 (Jetty 8 was Servlet 3.0)
from jersey.
@joakime The codebase I'm working on is running in production and is using Jetty 10 and Jersey 2.x. I'm migrating this codebase to Jetty 12. The Jersey example (2.x/examples/osgi-helloworld-webapp) works with Jetty 10 and Jersey 2.x. But is does not work with Jetty 12 ee8. My example (osgi-helloworld-webapp-jetty-12) works with Jetty 12 (ee8) and Jersey 2.x. I will use the approach used in osgi-helloworld-webapp-jetty-12 in my codebase. Is there anything against it?
from jersey.
@joakime Or in other words: I don't get it.
Jetty 10 works with Jersey 2.x in production.
Why is Jetty 10 not supported by Jetty 2.x?
Jetty 12 e88 seems to work with Jetty 2.x, but I'm not finished with my migration.
Why is Jetty 12 e88 not supported by Jetty 2.x?
from jersey.
@gpfeifer some history ...
- Servlet 1.0 thru Servlet 3.1 were backward compatible. (meaning if you wrote for and older version and deployed on a newer version, no big deal, it'll work)
- Servlet 4.0 added a few things to the APIs, but isn't 100% backward compatible with Servlet 3.1 or older (mostly due to behavior changes).
- Servlet 5.0 is not backward compatible with any versions before it (due to namespace changes)
- Servlet 6.0 removed classes and methods, changed important APIs, and changed behaviors. (this means if you wrote for Servlet 5.0 and deployed here, you'll likely have issues)
- Servlet 6.1 has a few changes to support new browser changes. (going from 6.0 to 6.1 should be trivial)
The fact that it seems to work for you is just luck, and is not to be relied on, as the most trivial change can suddenly cause issues for you. (eg: using Java 11 or older then moving to Java 17 and using those old versions of the Servlet spec, suddenly some of your responses are different.)
Jersey has newer versions to support (some of) the servlet specs listed above, in turn those containers (like Jetty) support the improvements in the Servlet spec too.
In Jetty 12, ee8, we try to maintain bug for bug compatibility with how things worked back then, but it's not perfect, and only strives for the bugs that existed back in EE8 days, not earlier.
Some things we cannot work around, like the changes in the JVM impacting behavior of your webapp.
from jersey.
Related Issues (20)
- 3.1.4 broken release, JettyConnectorProvider always throws exception HOT 2
- Shall we start a 4.0 branch? HOT 8
- Getting rid of `new File(URL.getPath()).toURI()` HOT 3
- @Context annotation declaration of HttpServletReqeuest object in parent reference is passing the first time API hit values to the resource always HOT 3
- Unbounded memory use of LRUMap due to removed access synchronization in ProviderBase HOT 6
- Can I add custom formatting settings to Gson in jersey-media-json-gson? HOT 2
- How to disable JaxRSFeature.READ_FULL_STREAM? HOT 2
- jersey-netty-connector: response body not processed when content-length/transfer-encoding headers are not present
- jersey-media-json-binding 3.0.12 has two impls of parsson on classpath
- InjectionManagerFactory not found in OSGi http service with Declarative service HOT 3
- Connectivity issues masked by ProcessingException: Already connected HOT 1
- IllegalAccessException in jersey-client-proxy when `@BeanParam` annotated class contains private fields
- ServletContext is invalid in MessageBodyWriter if handling async CompletionStage HOT 3
- Headers modified by MultiPartWriter are not sent HOT 2
- HttpUrlConnector and JettyConnector doesn't log the headers modified by MultiPartWriter HOT 2
- [Micrometer] suport for the @Counted annotation
- Wrong CDI-SE context is requested using jersey-media-jaxb versions 3.1.2 and higher running in a weld/grizzly container HOT 2
- jersey-netty-connector - Cancelling the future returned by rx() client does not terminate the request HOT 4
- Project Loom/JDK 21 compatible HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jersey.