Hi
some of our released modules are still based on Servlet API 3. Starting
with version 5 of the Servlet API, the packages have been renamed from
javax.servlet to jakarta.servlet and with version 6 of the API,
deprecated methods have been removed.
This means that a module compiled for Servlet API 3 does not run ootb
with Servlet API 5. And a module compiled for Servlet API 5 might not
run ootb with Servlet API 6.
For users of our modules we have to provide a way forward to allow them
to leverage newer Servlet API versions - but without loosing our user
base or making it unnecessarily hard for them. We have a large user base
out there which is still on Servlet API 3.
This is how I think a path forward can look like:
For our http server implementation (http jetty and http bridge), we have
the 4.x branch - it supports Servlet API 3, OSGi HTTP Service and OSGi
HTTP Whiteboard 1.x. We'll continue to provide fixes for this branch.
However this branch is based on Eclipse Jetty 9.4 and the Jetty project
recommends to update to newer Jetty versions.
For users who want to leverage Servlet API, we have http jetty and http
bridge 5.x on our main branch. This is based on Jetty 11. Our
implementation on the main branch supports Servlet API 3, Servlet API 5,
OSGi HTTP Service and OSGi HTTP Whiteboard 1.x and 2.x. This allows our
users to run modules using older servlet APIs with modules using newer
Servlet APIs in parallel - without a need to migrate their code. We
should encourage our users to move to this version - which should be a
drop-in replacement for most users. Only users who also leverage Jetty
API of 9.x might need to update their code to Jetty API 11.x.
Most of the other modules in Apache Felix around servlets are the
webconsole and various webconsole plugins. Currently the webconsole uses
Servlet API 3 and the OSGi HTTP Service. With the next release of the
webconsole, we will move to the OSGi HTTP Whiteboard 1.x away from the
outdated OSGi HTTP Service. In addition the webconsole will optionally
support *plugins* using the Servlet API 5. This gives a migration path
for all plugins while still allowing all of this to run in a Servlet API
3 container.
With that in place, we can migrate our webconsole plugins to Servlet API
5. And we already started with this in our code base.
Once we have all plugins migrated, we can switch the webconsole to be
based on Servlet API 5, OSGi HTTP Whiteboard 2.x and then optionally
support plugins using Servlet API 3. With that all our code should be on
Servlet API 5 - but all existing plugins regardless if they use Servlet
API 3 or 5 should still work in the webconsole.
The final piece is Servlet API 6 - I think for the webconsole and the
plugins, we can make them work with Servlet API 5 and Servlet API 6 by
basing them on Servlet API 5 and avoiding the removed methods. This way
we don't need to maintain any branches for all of that code.
But for the http server implementations (http base and http jetty) this
is not possible. We already have a branch for those leveraging Jetty 12
which supports Servlet API 6. However, this version does not support any
earlier Servlet API. While it is good to get this work started, I think
the first hill we have to climb is to get all our code to use Servlet
API 5 and take our users with us. Once we are there we can look down on
the road ahead to Servlet API 6 as we will have a much clearer view by then.
Regards
Carsten
--
Carsten Ziegeler
Adobe
cziege...@apache.org