Home > Blogs > VMware vFabric Blog

Tomcat 8: Websocket, Lamda Expressions, SpringOneG2X & More

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.”

Thomas outlined Tomcat 8 at his ApacheCon Europe 2012 presentation, “Apache Tomcat 8 Preview” in Sinsheim, Germany.

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.

This entry was posted in vFabric and tagged , , , , on by .
Adam Bloom

About Adam Bloom

Adam Bloom has worked for 15+ years in the tech industry and has been a key contributor to the VMware vFabric Blog for the past year. He first started working on cloud-based apps in 1998 when he led the development and launch of WebMD 1.0’s B2C and B2B apps. He then spent several years in product marketing for a J2EE-based PaaS/SaaS start-up. Afterwards, he worked for Siebel as a consultant on large CRM engagements, then launched their online community and ran marketing operations. At Oracle, he led the worldwide implementation of Siebel CRM before spending some time at a Youtube competitor in Silicon Valley and working as a product marketer for Unica's SaaS-based marketing automation suite. He graduated from Georgia Tech with high honors and an undergraduate thesis in human computer interaction.

25 thoughts on “Tomcat 8: Websocket, Lamda Expressions, SpringOneG2X & More

  1. Pingback: طراحی سایت زبان (JSP | TEK

Leave a Reply

Your email address will not be published. Required fields are marked *


You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>