InfoQ

InfoQ

News

My Bookmarks

Login or Register to enable bookmarks for unlimited time.

The content has been bookmarked!

There was an error bookmarking this content! Please retry.

Struts 2.1 Released

Posted by Ian Roughley on Feb 02, 2009

Sections
Development
Topics
Web Frameworks ,
Java
Tags
Struts

The latest version of the Struts2 framework, version 2.1, has just been released.  This release marks a significant upgrade, with changes being focused on refactoring more code into the plug-in framework, reducing XML configuration by adding a conventions plug-in, and improving REST support. 

I caught up with Musachy Barroso, one of the committers who has been helping to get this release out, to answer some questions:

What are the big differences between 2.0 and 2.1?

Many bugs were fixed in 2.1 (in Struts and Xwork). There are new plugins in 2.1 that push Struts 2 on the direction we want it to go, like REST, Convention and the Java Templates.

 

A lot of features have moved to plug-ins, can comment on why this was done?

The idea is to leave just "core" functionality in struts-core, and move anything else into plugins. This makes easier to maintain the code base and drop things that will not longer be supported, like the Dojo plugin for example. These changes don't bring any advantages for the users, except a small Struts footprint, if they are not using the mentioned plugins.

 

Can you talk about why the ajax tags have been depreciate?

Struts 2 Ajax tags are based on Dojo 0.4.x, and porting them to the latest Dojo version would mean a complete rewrite. Dojo has proven to be hard to keep up with, as new versions come out very often and the code changes a lot between even minor versions. Users often end up using straight Dojo, because the tags do not have all the functionality that Dojo offers. All these reason, and the lack of volunteers willing to work with the Dojo tags have forced us to deprecate the Ajax tags.

 

Why did the codebehind plug-in become the convention plug-in, and what new features it introduces

Convention was developed by Brian Pontarelli as an external project and was later brought into Struts.Convention has a better and faster classpath scanner, supports more configuration elements, better logging, many configuration options, configuration reloading and it is better documented.

 

What is the java templates plugin?

The Java Templates Plugin is a drop in implementation of the "simple theme" using just Java (the standard implementation uses FreeMarker). The tags in this plugin are 4 to 5 times faster than the standard ones, with the drawback that they cannot be overwritten.

 

With so many other web frameworks available, why do you think developers should choose struts2?

Struts 2 is probably the most loosely-coupled framework available. Out of the box, many features are usable with little or no customization and it is easy to learn. The same knowledge can then be applied to add plugins to override default behaviors. The loose coupling also allows business logic to be written with no knowledge of the existence of Struts. Despite this, Struts scales up really well and is currently powering some very high-traffic sites.

 

Anything else you want to add?

Struts 2.1 has taken a long time, but we have worked hard to improve the build and release process, so releases can be expected more often in the future.

Struts 2.1.6 can be downloaded from http://struts.apache.org/2.1.6/index.html.

Problem with Sitemesh by Ronald de Leon Posted
Re: Problem with Sitemesh by Philip Luppens Posted
Did they update bundled FreeMarker? by Attila Szegedi Posted
Re: Did they update bundled FreeMarker? by Philip Luppens Posted
  1. Back to top

    Problem with Sitemesh

    by Ronald de Leon

    Hi, I've tried using it but I experience having an infinite loop in the interceptors when used with sitemesh. The application is perfectly working with struts 2.0.x but having the said problem with 2.1.6.

  2. Back to top

    Re: Problem with Sitemesh

    by Philip Luppens

    Please post those issues on the Struts user mailing list, it'll be much easier to find a solution over there. There are lots of projects using Sitemesh & Struts 2.1.x (including a couple of mine), and we haven't encountered such a problem yet.

  3. Back to top

    Did they update bundled FreeMarker?

    by Attila Szegedi

    I wonder if they finally updated the bundled FreeMarker JAR... Previous Struts shipped with a four year old 2.3.8 FreeMarker (current one is 2.3.15)

  4. Back to top

    Re: Did they update bundled FreeMarker?

    by Philip Luppens

    We did - in 2.1.5 (pre-GA) we're using 2.3.13. I'm not sure we've updated to the latest one though.

Educational Content

10 tips on how to prevent business value risk

One category of risk that project teams need to ensure they address is business value failure – delivering a product that fails to provide value for the business investor.

Interview: Software Systems Architecture: Working With Stakeholders Using Viewpoints and Perspectives

InfoQ spoke to the authors of Software Systems Architecture on a couple of new topics, the System Context viewpoint and Agile, which have been added to the second edition.

Beauty Is in the Eye of the Beholder

Alex Papadimoulis discusses ugly code, where it comes from, how to avoid it, and how to get rid of it.

Architecting Visa for Massive Scale and Continuous Innovation

John Davies examines Visa’s architecture and shows how enterprises have architected complex integrations incorporating Hadoop, memcached, Ruby on Rails, and others to deliver innovative solutions.

Max Protect: Scalability and Caching at ESPN.com

Sean Comerford unveils ESPN.com’s architecture, what components are used and why, and the current changes the website goes through.

The Seven Deadly Sins of Enterprise Agile Adoption

Are there repeated patterns of failure on Enterprise Agile Enablement efforts? Sanjiv and Arlen discuss Seven Deadly Sins to avoid when adopting Agile in an enterprise.

Questions for an Enterprise Architect

Erik Dörnenburg answers: What is Enterprise and Evolutionary Architecture?, discussing 4 issues: Turning strategy into execution, Ensuring conformance, Where do the architects sit? Buying or building?

Wrap Your SQL Head Around Riak MapReduce

Sean Cribbs explains what Map-Reduce and Riak are, why and how to use Map-Reduce with Riak, and how to convert SQL queries into their Map-Reduce equivalents.