The first release candidate of Apache Tomcat 8 is now available as an alpha release. This release is intended to allow for testing and feedback. It is not intended for production use.
One of Pivotal’s senior engineers, leading expert, and Tomcat contributor, Mark Thomas, made the announcement on Tuesday via Apache Tomcat mailing lists. Tomcat 8.0 supports the Java SE 7 specifications including, Java Servlet 3.1, JavaServer Pages 2.3, Java Unified Expression Language 3.0, and the new Java WebSocket 1.0 specifications.
Developed in parallel, Thomas had previously explained how specifications and releases are related, “As the work on the specifications proceeds, and, as the changes firm up, then those changes will be implemented in the Tomcat 8 branch.”
|Interested in hearing more? Come to SpringOne2GX in Santa Clara, CA from Sept 9-12 and attend the Apache Tomcat 8 Preview session given by Pivotal's own Daniel Mikusa and Stuart Williams. Click here to register today. Early bird registration ends August 9th!|
Notable Updates and Improvements in Tomcat 8
- An HTTP protocol upgrade has been introduced that allows the client to specify switching protocols. Under the hood, this is the same capability that is used by WebSockets to upgrade the HTTP connection, although this allows for a broader range of protocols.
- Websocket 1.0 is implemented as a standard API. A Tomcat-specific version was provided in 7.0 because the specification wasn’t finalized. For those that are still familiarizing themselves with WebSocket, it allows full duplex communications over TCP. Most websites today run HTTP in half-duplex mode—this means that communications can happen in both directions, but only one at a time, like a walkie-talkie. The Websockets protocol is full duplex—this means that bidirectional data can flow at the same time. It was originally proposed with HTML5.
- EL can now run on it’s own in standalone mode, outside of servlets and JSP pages. In a nutshell, the enhancement allows you to call an ELProcessor class.
- There is now support for lambda expressions, similar to what will be in Java 8. These expressions can simplify code and are comprised of a set of parameters, a lambda operator, and a function body. See the following examples and overview for more information.
- Collection operators will allow for the construction of Sets, Lists, and Maps.
- The Java EL stream API includes filters like forEach, reduce, filter, and map. Here, you can take a collection or list, invoke a string method, and run additional filtering or aggregate functions on the list. For example, you could sum a string.
- Developers will be able to directly access static fields and methods of any classes imported to the EL context.
- Resources have been refactored to better support the inclusion of external resources. The implementation replaces Aliases, VirtualLoader, VirtualDirContext, JAR resources and external repositories with a single, consistent approach for configuring additional web application resources. The new resources implementation can also be used to implement overlays using a master WAR as the basis for multiple web applications that each have their own customizations. In addition:
- Security enhancements—primarily there is additional diagnostic information for SSL ciphers
- SPDY has been implemented for experimental use.
- New support for non-blocking I/O has been added as a default. This is a performance improvement and allows data to be managed asynchronously through a ReadListener and a WriteListener interface. This also applies to the new Websocket capabilities.
For more detail, resources and code examples see Apache Tomcat 8: What It Is, What You Need To Know.