Skip to main content

Servlet 3.0 (JSR 315) update

Posted by mode on December 2, 2008 at 11:24 AM PST

It's been a while since I gave an update about servlet 3.0. However while I haven't been blogging we at the expert group are working through refining and making the specification better for the web community. We are in the process of making the Public Review available and was waiting to push out a blog after that. However I have seen a few people write about the 3.0 work based on the Early Draft Review (EDR) (like thought it was best to clarify this so that there isn't any confusion arising from this.

The specification has evolved since the EDR and things have changed. the EDR is an early review to get feedback from the community. It is not the final version of the specification. Some of the changes that have happened since the EDR are :

  1. The annotations to define the http methods (GET, POST, etc) are no longer there. One would still have the extend HttpServlet and use the contract specified there. The top level annotations for declaring a Servlet and Filter are still there and that the expert group still feels is needed and useful to the community. However they are no longer POJOs.
  2. The fragments have evolved since the EDR and the rules for merging the fragments have been specified in the upcoming Public Review.
  3. The asynchronous (or what people are referring to as continuations) has also evolved. First off the notion of continuations is different than async. We now have what the expert group considers a cleaner proposal that will be able to handle a lot more use cases.

As an example of some of the things that you will have to do as a developer -

public class MyServlet extends HttpServlet {
    public void doGet(HttpServletRequest req, HttpServletResponse res) {

The suspend and resume APIs are no longer there. Instead we have a startAsync on request that returns an AsyncContext that the users then can use to do async operations and not have to block a thread to complete the processing.

These are just a sneak peak at what is coming and would encourage users to look at the public review when it becomes avaialble at the site and send feedback. In the mean time I also encourage people writing articles / blogs about servlet 3.0 to contact us at to get an update from the expert group so they can reflect the status of the specification correctly. I will be writing a more detailed blog with more samples show casing the features in the servlet 3.0 specification in the coming days so stay tuned.

Related Topics >>