views:

358

answers:

2

I'm rolling J2EE code that adheres to Servlet 2.5 and am wondering what the major differences are between 2.5 and 3. Pointers to official Sun docs and personal experiences most appreciated.

If I shouldn't be concerning myself with 3 for the time being, just say so. Thanks!

+2  A: 

Servlet 3.0 has not yet been released, but it looks like it's very close. The most important changes in 3.0 are: Pluggability, Ease of development, Async Servlet, Security. Whether or not these are important to you is impossible for me to say.

The most significant of these is probably the support for asynchronous Servlets. Here's an article that describes this in detail. The full specification can be downloaded here.

Don
Holy crap, that's great. The async stuff looks awesome, thanks for the info. I have just finished coding something very similar to this.
Max A.
+2  A: 

As Don mentioned, the main areas of improvements and additions are:

  • Pluggability (modularizing of web.xml)
  • Ease of development (annotations, generics, convention over configuration)
  • Async servlet support (for comet style programming, async web proxy, async web services)
  • Security enhancements (programmatic login/logout)
  • Others (HttpOnly Cookie, Session tracking, EJB in WAR file)

Check out the Javaone 2008 presentation "Java Servlet 3.0 API: What's new and exciting" for details.

Pascal Thivent