Versions Compared

Key

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

...

The tag prefix conventions in the example applications have changed.

JSP

s:

<s:form ...>

Freemarker

s.

<@s.form ...>

Velocity

s -

#sform ( .. ) For Velocity, the hyphen is part of the token.

New property settings

struts.compatibilityModeenable.WebWork DynamicMethodInvocation

Enable support for the action!alias syntax (TRUE)

New members or feature changes

  • 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.
    • 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.
    Code Block
       <action name="myAction" method="insert" ....>
         .....
       </action>
    
       // with the above configuration, and PrepareInterceptor in play, 
       // callsequence will be 
       1] prepareInsert() (If it exists)
       2] prepare() (Unless Interceptor's alwaysInvokePrepare parameter is set to false)
       3] insert()
    
  • 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.
    Code Block
    <action name="myAction" method="insert" ...>
           ...
        </action>
    
        // with the above configuration, and DefaultWorkflowInterceptor in play, 
        // call sequence for action that implements Validateable interface will be 
        1] validateInsert()
        2] validate() (unless Interceptor's alwaysInvokeValidate parameter is set to false)
        3] insert()
    

Removed or deprecated

...

action!alias

...

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.

Code Block
  <action name="..." method="submit">
    ...
  </action>

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

...