The first release candidate for Apache Tomcat 8 is now available. It aligns Tomcat with the Java EE 7 specification, including Java Servlet 3.1, JavaServer Pages (JSP) 2.3, and Java Unified Expression Language (EL) 3.0 as well as introducing support for WebSocket 1.0. The features for the specifications are complete, however there is still some internal TODO items to complete, hence the ASF has determined this release is an alpha release and as usual for initial releases, it is not recommended for production environments.
Key improvements for the release include:
- WebSocket support. WebSocket is now supported as a standard API. Tomcat 7 had support, but it was Tomcat-specific support because the specification wasn’t finalized. The Websockets protocol supports full duplex communication—this means that bidirectional data can flow at the same time.
- HTTP protocol upgrade. This 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.
- Non-blocking I/O is default. This connector is now used by default for HTTP and AJP.
- Refactoring of resources. Possibly the biggest change, this refactoring was completed to better support including external resources. It is now really easy to have one 'master' WAR used as the basis for multiple web applications each with their own customizations.
- Experimental SPDY support. This protocol is designed to make the web faster, although it is limited to HTTPS support only.
- 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.
- Collection operators added. These will now allow for the construction of Sets, Lists and Maps.
- New Java EL stream API filters. New filters include 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.
- EL can run stand-alone. EL can now run by itself, outside of servlets or JSP pages, making it possible for applications to interact with it directly.
Further explanation and examples of what is new in Tomcat 8 is outlined here. For even more detail, check out the change logs, or consider attending SpringOne2GX in Santa Clara from Sept 9-12 where Tomcat 8 will be previewed live with some of Pivotal's Tomcat experts. Early bird discounts ($200 savings) expire August 9th.
Apache Tomcat 8 binaries can be downloaded here.