Skip to content

Support for Servlet 4.0 API [SPR-12674] #17273

Closed

Description

@spring-projects-issues

Juergen Hoeller opened SPR-12674 and commented

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.


Issue Links:

Referenced from: commits eeb01db, 199aa77

2 votes, 7 watchers

Activity

  1. spring-projects-issues commented on Feb 11, 2017

    @spring-projects-issues
    CollaboratorAuthor

    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 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.

  2. spring-projects-issues commented on Mar 6, 2017

    @spring-projects-issues
    CollaboratorAuthor

    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 ServletContext interface, which we're supporting on our MockServletContext for 5.0 RC1 now.

  3. spring-projects-issues commented on Apr 25, 2017

    @spring-projects-issues
    CollaboratorAuthor

    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.

  4. added
    type: enhancement
    in: web
    on Jan 11, 2019
  5. added this to the 5.0 M5 milestone on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: webtype: enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions