BT

Struts 2.1 Released

by Ian Roughley on Feb 02, 2009 |

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.

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

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.

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.

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)

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.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

4 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT