dagblog.
← Archive

Servlets — What’s ahead, we hope


Last week, the Servlet 3.0 specification appeared as JSR 315. I don’t know why the numbering changed when the last version was 2.5, but that isn’t the point. The Servlet 3.0 specification is planned for J2EE 6.0 and is driven by two main themes: making development easier and making it easier to integrate servlet-based web frameworks.

Simpler development
 Servlets were one of the few areas unaffected by the changes in Java 5, especially annotations and generics. Version 3.0 should fix that. Another welcome change, which worked well in EJB 3.0, is to require minimal configuration and remove the need for XML deployment descriptors.
 Web framework integration
 Most web frameworks integrate through web.xml, where you define a servlet or listener for initialization and receiving requests. With annotations, it shouldn’t be necessary to declare these things in web.xml. The servlet API should also be extended with programmatic access to web.xml and a way to change the values specified there.
 Request processing
 Nonblocking reads and writes, deferred request processing, asynchronous notifications, and other requirements arising from the Comet approach. See The comets are coming.
 Security
 Support for login, logout, and registration. I’m not entirely sure how to integrate these particular operations, but we’ll see.
 Working with other JSRs in J2EE 6.0
 This primarily means the planned specifications for JSF 2.0 (JSR 314) and REST (JSR 311), and the requirements they bring.
 Smaller changes
 Improved welcome file definitions, ordering of servlet context listeners, and file upload support with a progress listener.

Well-known open-source frameworks will contribute to and inspire the integration work, such as Grizzly (HTTP/S connector), DWR (Comet and AJAX framework), the Jetty and Apache servlet containers, and web frameworks like Struts, Shale, and Spring Web Flow. The first public review of the specification should be available at the end of this year.

Medium version

Related articles

Related CZ Podcast episodes