Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

all

The entire distribution, including all the elements. (36mb)

apps

The example applications, as ready-to-deploy WARs. (27mb)

blank

Just the blank application, ready to deploy as a template for new development. (Also included in apps.) (4mb)

docs

The documentation, as provided on the website (currently only the welcome page Javadocs, not the wiki pages). (6mb)

lib

The essential dependencies, including the Struts 2 JARs. (3mb)

src

The source code for the framework, ready to build as a Maven project. (18mb)

sj4

The Java 1.4 versions of the Struts and XWork JARs (prepared using RetoTranslator). (1mb)

  • If you are a Maven developer, you might want to get started using the Maven Archetype.
  • Another quick-start entry point is the blank application. Rename and deploy the WAR as a starting point for your own development.

...

  • Struts 2 is dependant on XWork 2 (nightly build).
  • At this time, Java 1.5 is required to build and deploy Struts 2. If possible
    • For Java 1.4 deployments, RetroWeaver or RetroTranslater may be used to
    support
    • provide Java 1.4
    in the Struts 2.0.x series.
    • support
    • A pre-packaged set of RetroTranslator JARs are being provided with the distribution.

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

...

  • Datepicker tag is now using dojo's (limited in terms functionality and internationalization)
  • 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.Configuration is no longer statically accessible, it is created by ConfigurationManager.
    • Custom configuration could be done through ConfigurationManager which in turns could be configured through DispatcherListener.Custom configuration to ConfigurationManager and Configuration cannot be done statically anymore, instead use Dispatcher's DispatcherListener to achieve such the same effect.
  • The prepare interceptor now uses reflection to call prepareXxx where Xxx prepare_Method_ where method is the action method configured for the particular action in struts.xml.
    Code Block
       <action name="myAction" method="executeinsert" ....>
         .....
       </action>
    
       // with the above configuration, and preparatorPrepareInterceptor interceptor in placeplay, call
       // sequencecallsequence will be 
       1] prepareInsert() prepareExecute(If it exists)
       2] prepare() (couldUnless beInterceptor's leftalwaysInvokePrepare outparameter dependingis onset interceptor's alwaysInvokePreapre parameterto false)
       3] executeinsert()
    
  • Default workflow interceptor DefaultWorkflowInterceptor (named workflow in struts-default.xml) now uses reflection to call validateXXX validateMethod on the action class that implements Validateable interface where XXX method is the action method configured for the particular actionin action in struts.xml.
    Code Block
    <action name="myAction" method="executeinsert" ...>
           ...
        </action>
    
        // with the above configuration, and workflowDefaultWorkflowInterceptor interceptor in placeplay, call
        // call sequence for action that imlpementsimplements Validateable interface will be 
        1] validateExecutevalidateInsert()
        2] validate() (couldunless beInterceptor's leftalwaysInvokeValidate outparameter dependingis onset interceptor's alwaysInvokeValidate parameterto false)
        3] executeinsert()
    

Removed or deprecated

action!alias

The "action!alias" syntax is deprecated. The idiom is disabled by default, but it can be enabled via the struts.compatibilityMode.WebWork property setting. This setting will be removed in a future release.

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)

Code Block
 <s:textarea theme="ajax" /> 

doActionMethod

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

In the old syntax, * try to execute submit() method in the action * try to execute doSubmit() method in the action if Step 1] fail * fail In Struts2 * try to execute submit() method in the action * fail
Code Block
  <action name="..." method="submit">
    ...
  </action>
Code Block

In WebWork,

  • try to execute submit method in the action, fail
  • try to execute doSubmit method in the action if Step 1, fail
  • fail

In Struts,

  • try to execute submit method in the action, fail
  • fail

From Struts 1

...