Jason Hunter writes, "Servlet 2.4 lacks some of the fireworks of past releases. Servlet 2.2 introduced the notion of self-contained Web applications. Servlet 2.3 added the power of filters and filter chains. Servlet 2.4, while adding several interesting features, has no superstars and spends more time polishing and clarifying the features that came before?a tying up of loose ends."
- Servlets now require HTTP/1.1 and J2SE (Java 2 Platform, Standard Edition) 1.3, and can work with J2EE 1.4
- ServletRequest has new methods to observe the client connection
- New support for internationalization and charset choice
- RequestDispatcher has new features and clarifications
- New ServletRequest listener classes and methods
- A deprecated SingleThreadModel
- HttpSession details and interaction with logins has been clarified
- Classloading and welcome-file behavior has been clarified
- The web.xml file now uses XML Schema and has added a slew of new elements
Before we begin looking at these changes, let me point out that most servers don't yet have fully compliant Servlet 2.4 implementations. If you want to test those features, your best bet is to download the official reference implementation server, Apache Tomcat 5.0. It's open source, and you can download the server for free. Tomcat 5.0 will be the first Tomcat version to support Servlet 2.4, but, of course, its latest release is still an alpha.