Versions Compared

Key

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

...

  • Acegi Security extension is available.
  • JavaServer Faces extension is available.
  • Multiple struts.xml files are supported. If present, multiple struts.xml files are automatically loaded from arbitrary packages on the classpath. Among other things, this change means that Freemarker (or Velocity) modules can be plugged into an application by dropping in a single JAR with Actions, Results, and configuration files.

Key Changes

Depending on whether you are coming from a Struts 1 or a WebWork 2 background, your perspective on the key changes will differ.

...

  • 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()
    
  • Datepicker tag is now using dojo's (limited in terms functionality and internationalization)
  • FreeMarker and Velocity templates can be bundled into JARs, and include a struts.xml file.
  • Multiple struts.xml files can be loaded from arbitrary packages on the classpath. Among other things, this change means that Velocity and Freemarker modules can be plugged into an application by dropping in a single JAR with Actions, Results, and configuration files.
  • Tiles integration extension is available.
  • Wildcards can be specified in action mappings.

...