From Struts 1

From WebWork 2

For Java 1.4 deployments, RetroWeaver or RetroTranslater may be used to provide Java 1.4 support

A pre-packaged set of RetroTranslator JARs is being provided with the distribution.

For other changes from WebWork 2, see the "Members to rename", "New property settings", "New features or feature changes", and "Removed or deprecated".

Members to rename

WebWork 2

Struts 2

com.opensymphony.xwork.*

com.opensymphony.xwork2.*

com.opensymphony.webwork.*

org.apache.struts2.*

xwork.xml

struts.xml

webwork.properties

struts.properties

DispatcherUtil

Dispatcher

com.opensymphony.webwork.config.Configuration

org.apache.struts2.config.Settings

The tag prefix conventions in the example applications have changed.

JSP

s:

<s:form ...>

Freemarker

s.

<@s.form ...>

Velocity

s

#sform ( ... )

New property settings

struts.enable.DynamicMethodInvocation

Enable support for the hardwired action!alias syntax (Default is TRUE)

Icon

It is recommended that all applications specify the DynamicMethodInvocation setting for now, since the default may change. The recommended approach to action aliasing is to use wildcard aliases instead of the hardwired bang.

New features and feature changes

Various changes to ConfigurationManager

ConfigurationManager is no longer a static factory. It is now an instance created through Dispatcher. Custom configuration could be done through DispatcherListener.

Custom configuration to ConfigurationManager and Configuration cannot be done statically anymore, instead use Dispatcher's DispatcherListener to achieve the same effect.

The prepare interceptor now uses reflection to call prepare_Method_ where method is the action method configured for the particular action in struts.xml.

DefaultWorkflowInterceptor (named workflow in struts-default.xml) now uses reflection to call validateMethod on the action class that implements Validateable interface where method is the action method configured for the particular action in struts.xml.

Datepicker tag is now using dojo's (limited in terms functionality and internationalization)

MessageStoreInterceptor is introduced to allow field errors / action errors and messages to be store and retrieve through session, resulting them to be preservable across request.

Removed or deprecated

AroundInterceptor

The AroundInterceptor has been removed. If your application extends the AroundInterceptor, either import the class into your source code form WebWork 2 (pursuant to the Open Symphony License) and modify it to server as your own base class, or rewrite your interceptor.

oldSyntax

Support for the "oldSyntax" is removed.

Rich text editor tag

Rich text editor tag has been removed (a possible replacement would be to use the textarea tag with theme="ajax", this will used dojo's rich text editor)

doActionMethod

The convention of trying a "do" form of an action method is not supported.