I try to port from Jetty 10.x to Jetty 12.x ee8. After I have change the dependencies based on this list https://download.eclipse.org/tools/orbit/simrel/maven-jetty/release/12.0.6/. I get some compiler errors with the embedded Jetty.
There seems no ee8 Server class that I use org.eclipse.jetty.server.Server. This class extends from the org.eclipse.jetty.server.Handler.Wrapper.
But the handler from the jetty-ee8-nested extends from org.eclipse.jetty.ee8.nested.HandlerWrapper which is not compatible. For example the org.eclipse.jetty.ee8.nested.InetAccessHandler. The one expected the org.eclipse.jetty.server.Handler the other org.eclipse.jetty.ee8.nested.Handler
Is there another implementieren of Server which I have oversee? Where can i find it? How is the classname?
Or must I modify my code? For example how can I change the follow lines?
InetAccessHandler ipaccess = new InetAccessHandler();
ipaccess.setHandler( getHandler() );
setHandler( ipaccess );
First, there's a porting guide from Jetty 11 to Jetty 12: https://eclipse.dev/jetty/documentation/jetty-12/programming-guide/index.html#pg-migration-11-to-12
It shows many of the things you are asking about.
Ignore the classes in the
org.eclipse.jetty.ee8.nested.*package, those are internal classes for the ee8 layer.Use
org.eclipse.jetty.server.handler.InetAccessHandler.You can wrap that around any Handler, eg:
org.eclipse.jetty.server.Handler.Sequence, aorg.eclipse.jetty.ee8.webappWebAppContext, etc ...This snippet is from https://github.com/jetty/jetty-examples/tree/12.0.x/embedded/ee8-webapp-context