You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A placeholder for dedicated Servlet 4.0 support, such as declaring push resources in an MVC controller. Targeting Spring Framework 5.0 in Q2 2017, against Servlet 4.0 public final draft.
The Servlet 4.0 b02 API was released a few days ago, appearing feature-complete.
It turns out that there are only really new setSessionTimeout and addJspFile methods on ServletContext, both of which we can easily support in our MockServletContext while retaining Servlet 3.1 compatibility. The new GenericFilter and HttpFilter base classes are overdue for a decade but don't really matter for Spring at this point.
The single new feature addition is the PushBuilder mechanism: HttpServletRequest.getPushBuilder() is fortunately declared as a default method, so it doesn't get in the way of our MockHttpServletRequest's Servlet 3.1 compatbility. Programmatic access can be streamlined through direct support for a PushBuilder handler method argument in ServletRequestMethodArgumentResolver which we can easily do for 5.0.
A declarative resource-push variant seems too first-class and too specific at this point, and therefore not within the scope of this ticket. If we ever provide something in that direction, it needs to be well-integrated with our static resource handling support.
Servlet 4.0 b03 is available in the meantime, adding setters and getters for a default request/response character encoding to the ServletContext interface, which we're supporting on our MockServletContext for 5.0 RC1 now.
We've tested against Servlet 4.0 b05 in the meantime, still waiting for b06 which corresponds to the recently submitted Servlet 4.0 public final draft. This might work out for our 5.0 RC1 still; otherwise we'll pick it up for RC2, along with a corresponding Tomcat 9 milestone.
Activity
spring-projects-issues commentedon Feb 11, 2017
Juergen Hoeller commented
The Servlet 4.0 b02 API was released a few days ago, appearing feature-complete.
It turns out that there are only really new
setSessionTimeoutandaddJspFilemethods onServletContext, both of which we can easily support in ourMockServletContextwhile retaining Servlet 3.1 compatibility. The newGenericFilterandHttpFilterbase classes are overdue for a decade but don't really matter for Spring at this point.The single new feature addition is the
PushBuildermechanism:HttpServletRequest.getPushBuilder()is fortunately declared as a default method, so it doesn't get in the way of ourMockHttpServletRequest's Servlet 3.1 compatbility. Programmatic access can be streamlined through direct support for aPushBuilderhandler method argument inServletRequestMethodArgumentResolverwhich we can easily do for 5.0.A declarative resource-push variant seems too first-class and too specific at this point, and therefore not within the scope of this ticket. If we ever provide something in that direction, it needs to be well-integrated with our static resource handling support.
spring-projects-issues commentedon Mar 6, 2017
Juergen Hoeller commented
Servlet 4.0 b03 is available in the meantime, adding setters and getters for a default request/response character encoding to the
ServletContextinterface, which we're supporting on ourMockServletContextfor 5.0 RC1 now.spring-projects-issues commentedon Apr 25, 2017
Juergen Hoeller commented
We've tested against Servlet 4.0 b05 in the meantime, still waiting for b06 which corresponds to the recently submitted Servlet 4.0 public final draft. This might work out for our 5.0 RC1 still; otherwise we'll pick it up for RC2, along with a corresponding Tomcat 9 milestone.