ApacheCon Europe 2012

Rhein-Neckar-Arena, Sinsheim, Germany

5–8 November 2012

Modern Web Application Development With Apache Struts 2

René Gielen , Johannes Geppert

Audience level:

Tuesday 2 p.m.–2:45 p.m. in Rhein-Neckar


Most Java web developers know the Apache Struts brand. Less known seems to be the fact that this brand not only stands for maintaing a classic, yet somewhat out-of-date framework.

With Struts 2, which will be introduced in this talk, the Apache Struts project delivers an elegant, state-of-the art action based web framework addressing todays' needs with todays' technologies.


Apache Struts is probably one of the most classic brands in the Java Web Frameworks space - first off, as Struts 1 was the first “real” web framework to solve problems beyond Servlets and JSP. For that reason it became the long time quasi standard for developing Java based web applications, before the rise of JSF and other frameworks and tools. Secondly, a lot of people share a connotation for the term “classic” such as that Apache Struts would be out of date nowadays and was replaced by more modern action based web frameworks.

As for Struts 1, this is surely true. Less known seems to be the fact that one of the modern, state-of-the-art replacements for this framework carries the Struts brand likewise - namely Apache Struts 2. While obviously being tagged with an incremented major release number, it is a complete rewrite based on Opensymphony WebWork 2 and the shared forces of the then merged project teams of both the Struts and WebWork projects.

This talk will introduce and demonstrate the concepts and key values of the Apache Struts 2 framework, such as

  • XML-free configuration realized through Convention-Over-Configuration and Java annotation based Configuration-By-Exception
  • a unique, loosely coupled and extendible architecture based on the Value-Stack concept, allowing for elegant technical solutions
  • a thread-safe, POJO based programming model with excellent support for automated testing
  • interceptors and interceptor stacks for addressing cross-cutting concerns
  • dependency injection as a first class citizen, supporting a choice of Spring, Guice or CDI / Java EE6 integration
  • powerful tag libraries for client side development
  • comprehensive support for localization and internationalization
  • declarative validation both on the client- and server-side
  • transparent support for various result types, such as JSON, XML, PDF / Jasper Reports and many more
  • powerful plugin system with over 50 existent plugins, delivering integration of technologies such as REST, AJAX, JQuery-UI, Sitemesh, Groovy, YUI, Portlet 2.0 and many more
  • tooling support, e.g. by IntelliJ IDEA, Zeroturnaround JRebel or MyEclipse