Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
spring-projects-issues opened this issue Jan 30, 2015 · 3 comments
Closed

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

spring-projects-issues opened this issue Jan 30, 2015 · 3 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Jan 30, 2015

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

@spring-projects-issues
Copy link
Collaborator Author

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.

@spring-projects-issues
Copy link
Collaborator Author

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.

@spring-projects-issues
Copy link
Collaborator Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants