Struts 2.0.x to 2.1.x Converter Plugin


José Yoshiriro


Open Source (ASL2)




Struts 2.0.2+



Error formatting macro: rate: java.lang.NoSuchMethodError: 'java.lang.String com.atlassian.confluence.setup.BootstrapManager.getDomainName()'


This tool follows the directives in Troubleshooting guide migrating from Struts 2.0.x to 2.1.x and updates the content of the JSP, XML and Java files creating a backup file for each updated one.

For example, one of the updates performed is to change

<s:url id="urlA" action="doThat" namespace="/myNameSpace"/>

<s:div theme="ajax" href="%{urlA}" notifyTopics="/myTopic"/>


<s:url var="urlA" action="doThat" namespace="/myNameSpace"/>

<sx:div href="%{#urlA}" afterNotifyTopics="/myTopic"/>


Download and run the yoshi_struts20x_to_21x_converter.jar using the common command for execute jar files:

> java -jar yoshi_struts20x_to_21x_converter.jar

Follow the instructions for the five steps:

Step 1: Set the Project Folder

Paste the full path of the folder where are the files (.JSP, .XML and .Java). The converter will search in all subfolders for candidates to update. This folder can be your java IDE project folder, for example.
If an empty text is setted, the program will abort.

Step 2: Comma-separated file extentions to update

List of comma-separated file extentions for content update.
I.e. jsp,xml. In this case only .JSP and .XML files found in the folder setted in Step 1 will be updated.
The default value of this information is jsp,xml,java (used if an empty text is setted).

Step 3: Charset of JSP files content

Charset of JSP files content.
The default value of this information is ISO-8859-1 (used if an empty text is setted).

Step 4: Struts 2.0.x tags prefix used in your project

The Struts 2.0.x tags prefix used in your project. Some developers like to use "custom" prefixs, like "struts" or "st" instead "s".
The default value of this information is s (used if an empty text is setted).

Step 5: Struts 2.1.x tags prefix to be used in your project

The Struts 2.1.x tags prefix to be used in your project. You will can use "custom" prefixs, like "strutsajax" or "sxt" instead "s".
The default value of this information is sx (used if an empty text is setted).

After this five steps, the program will request your final confirmation.

Important: Backup files will be created for updated files.

What Happens?

Also el expressions are replaced from all Struts 2 tags. Ognl expression are used instead.


<s:div id="${myVar}"/>

changes to

<s:div id="%{#myVar}"/>

Version History






Jan 26, 2009

José Yoshiriro

Initial release

JFW plugin update

Released core 1.0.12

"In short, JFW offers features like connection pools, logging management and more utilities classes that not offered by Struts."

cswish plug-in

cswish is a struts plug-in based on SSH(struts2,spring,hibernate), it brings all kind of 'ZERO' to your application - zero configuration, zero page, zero action, zero DAO...
Yes, for the simple general business, it's the only job to write your hibernate model.

Project is hosted at

JFW plugin

Released core 1.0.10 and log viewer 1.0.3.

In this version the configuration can be done once by project without create Interceptor Stacks using constants.

Also using this constants, you can create custom Interceptor Stacks with diferent configurations, using paratemers.

1.5c version released (12/03/2008):
Bugs Fix + Multiple XML packages extend and super class targets for Hibernate Session Allowed

1.5b version released (10/24/2008):
Wildcards are allowed in target attribute

Hibernate Session Plugin

Plugin for Struts 2 that opens an Hibernate Core Session, sets it in the value stack of the Actions configured for the HibernateSessionInterceptor (provided by this plugin) and closes (or not) it after the results are rendered for the client.

No code lines need to be added to use Hibernate in Struts 2 projects. Only some .XML/.properties lines are needed.

Ideal for new projects using Struts 2 and Hibernate.

Plugin Page

JCaptcha4Struts2 - JCaptcha Plugin

JCaptcha4Struts2 is a Struts 2 Plugin which allows to add Captcha support to your Struts 2 Applications with a single JSP tag, and slight (optional) configuration in your struts.xml. It uses the powerful JCaptcha engine internally to generate the captcha.

Project is hosted at

JFW plugin

JFW is a framework/library complement for your Struts based applications.
JFW is a Java framework and library that simplifies the creation of web based Java applications. What it offers to the programmers is an architecture multi layer and MVC, this last one based on Struts, and utilities classes.

ps. more than 100 downloads and no suggestions? come on guys i need your feedbacks.

Resin-IoC 3.1.5 plugin

Resin 3.1.5 now contains a Struts2 ObjectFactory plugin, enabling Resin-IoC capabilities for any Struts2 action. Documentation is available at

Resin-IoC capabilities for Struts2 actions

  • WebBeans dependency injection with @In, @Named, etc.
  • Scoped components including @SessionScoped, @RequestScoped, @ApplicationScoped
  • EJB annotations like @TransactionAttribute
  • Interception using @InterceptorType
  • WebBeans event listening with @Observes

Adding the Object Factory

To enable Resin-IoC with Struts, you'll need to copy the resin/ext/resin-support.jar to either WEB-INF/lib or resin/ext-webapp. And you'll need to create or modify WEB-INF/classes/ as follows:

 # Tell struts to ask Resin for new action instances
 struts.objectFactory = com.caucho.xwork2.ResinObjectFactory

Implementation details

 public class ResinObjectFactory extends ObjectFactory {
    private WebBeansContainer _webBeans = WebBeansContainer.create();

   public Object buildBean(Class clazz, Map extraContext)
     return _webBeans.getObject(clazz);
Scope Plugin Released

The first version of the Scope Plugin has been released. The scope plugin provides Seam-style bijection and conversation management for action properties. This allows action properties to be declaratavely bound to one of several built-in scopes. There is also a conversation management feature that allows conversations to be started and stopped declaratively. Items that are part of the conversation are automatically cleaned up when the conversation is ended.

Plugin Registry Page: Scope Plugin
Author: Don Brown and Tom Schneider

I'm glad to announce the release of version 0.2 of the Struts 2 Rome plugin, a plugin that allows easy outputting of Rome SyndFeed objects into RSS or Atom feeds. This long overdue release now features support for custom mime types and allows overriding the encoding.

What's new in this release:

  • Support for custom encodings (ticket #1)
  • Support for custom mime types (ticket #2)
  • Support for all Rome feed types (rss 0.9+, atom 0.3+)
  • Added better javadoc comments
  • Added ASL 2.0 header
  • Some small fixes

The new plugin jar can be downloaded from Google code

Ajax File Upload Plugin

Version 1.0 of the AjaxParts Taglib (APT) plugin is now available. This plugin provides a quick and easy way to get started with APT from Java Web Parts (JWP). A sample app is also available.

Web site:

Version 1.0 of the DataVision plugin is now available. This plugin provides support for DataVision, a popular open-source reporting package. Feedback is welcome!

Web site:

HDIV Plugin 2.0 Released

HDIV plugin 2.0 that integrates HDIV and Struts 2 is available. The security functionalities added to the original Struts 2 version are these: Integrity, Confidentiality of non editable data and Generic Validations of the Editable Data.

Project Website: