Description
While Spring Framework 6.0 intends to retain a Servlet 5.0 (Jakarta EE 9) baseline for the time being, there is a breaking change in Servlet 6.0 (Jakarta EE 10) that we need to take into account: the removal of the deprecated HttpSessionContext
interface which makes existing implementations of HttpSession
non-resolvable against the Servlet 6.0 API, as long as they keep implementing the deprecated getSessionContext()
method.
This affects our Servlet API mocks which effectively do not work in a Servlet 6.0 setup. By compiling against Servlet 6.0, we can avoid implementing the deprecated getSessionContext()
method while still retaining compatibility with Servlet 5.0 based code - except for getSessionContext()
which threw an UnsupportedOperationException
before in any case.
This also enables us to use new Servlet 6.0 facilities where appropriate - any time in the Spring Framework 6.x generation. Aside from avoiding 5.0-deprecated methods for Servlet 6.0 compatibility (where they got removed), no specific support for Servlet 6.0 mechanisms (such as ServletRequest.getServletConnection()
or Cookie
attributes) has been introduced yet.