Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

Sponsored Links

Optimize with a SATA RAID Storage Solution
Range of capacities as low as $1250 per TB. Ideal if you currently rely on servers/disks/JBODs

Servlet 2.4: What's in store

A full update on the latest servlet spec

  • Print
  • Feedback

Page 5 of 5

A few other items were postponed. One is the New I/O (input/output) API, an exciting new J2SE feature that greatly speeds client-server communication thanks to a new channel metaphor that lets you buffer in system memory and memory-map files, leverage DMA (direct memory access), and scatter/gather hardware devices' I/O features. Unfortunately, for Servlet 2.4 to use New I/O and channels, J2SE 1.4 would have been set as a minimum requirement, and doing so was considered premature. Server vendors can still use New I/O in their implementations if they like, but servlets won't be able to take full advantage of New I/O until they can get a true channel to communicate with the client.

Also not included are any rules on how HTTP and HTTPS interfaces on the same server should interoperate. Should sessions be the same, or must they differ? Should forward() and include() work, or should you use sendRedirect()? Perhaps these issues can be clarified in the next release.

Start serving up Servlet 2.4

As I've described in this article, Servlet 2.4 adds new minimum requirements, new methods to observe the request, new methods to handle the response, new internationalization support, several RequestDispatcher enhancements, new request listener classes, session clarifications, and a new Schema-based deployment descriptor as well as several new J2EE elements. The specification document overall has also been tightened to remove ambiguities that might interfere with cross-platform deployment. All in all, the spec includes four new classes and seven methods added to existing classes, one new constant variable, and one deprecated class. For a cheat sheet on moving from 2.3 to 2.4, see the sidebar below.

About the author

Jason Hunter is author of the book Java Servlet Programming, 2nd Edition (O'Reilly, 2001; ISBN: 0596000405) and coauthor of the new Java Enterprise Best Practices (O'Reilly, 2002; ISBN: 0596003846). He's an Apache Member and, as Apache's representative to the Java Community Process Executive Committee, he established a landmark agreement for open source Java. He's publisher of Servlets.com, an original contributor to Apache Tomcat, and a member of the expert groups responsible for Servlet/JSP and JAXP (Java API for XML Parsing) development. He cocreated the open source JDOM library to enable optimized Java and XML integration. Recently he designed and developed CountryHawk, a product that quickly determines a user's country based on their IP address.

Read more about Enterprise Java in JavaWorld's Enterprise Java section.

  • Print
  • Feedback

Resources