Posted by mode
on April 28, 2009 at 1:20 PM PDT
It's been a while since my last update. However I am pleased to report that the Proposed Final Draft (PFD) of Servlet 3.0 is now been handed off to the JCP. Some highlights of what is in the PFD draft -
- The issues around Async have been worked out and Greg will also be posting an update to his last set of comments. Basically there were some tweaks to the APIs and semantics of the proposal. However the proposal itself hasn't changed drastically. It has been implemented in GlassFish and I believe also in Jetty 7.0 pre release build.
- We now have an ordering solution for Servlets, Filters and Listeners that also allows users to control what jar files are looked up based on the pluggability feature described previously.
- In addition to the pluggability via fragments, annotations, we also introduced the concept of
ServletContainerInitializer which allows you to plugin providers based on either annotations or classes that a particular class implements. For example when plugging in JAX-WS into a web container to support web services, today most implementations require you to use a proprietary descriptor (unless you are writing a JSR 109 style web service) for using the web service library in a web container. I will provide more details of how framework authors can use the
ServletContainerInitializer in a separate blog soon to follow.
- Ability to load static resources and JSPs from a jar file. This feature enables users to bundle shared resources in a jar file in a special directory -
META-INF/resources. When included in the WEB-INF/lib directory of the webapp, if the container does not find a particular resource in the root directory of the webapp, it will look at the jar files in the WEB-INF/lib to see if the resource is bundled in META-INF/resources of any jar file and serve it up.
- Security enhancements - programmatic authenticate, login and logout support. Support for
@RolesAllowed, @PermitAll, @DenyAll annotations in the web container.
- Updated existing APIs to use generics where possible in a backward compatible manner.
- Default error pages for error codes.
- Clarified welcome files.
- File upload - We have a basic solution in place, which we will build upon in a future release of the Servlet specification.
Look out for the specification release (I will post an update when relased) and provide feedback.
If you are attending JavaOne this year, Jan Luehe (from Sun), Greg Wilkins(Jetty / Webtide) and I will be presenting the Servlet 3.0 features in a technical session - TS-3790 "Java