Struts Action 2 migration tools include the notions of
- bridge objects to utilize existing SAF1 resources, and
- utilities to convert resources to SAF2 equivalents.
This is a whiteborad describing tools that volunteers might write, given sufficient interest. |
Dual Processor, Shared Resources
- An SAF2 TextProvider that retrieves messages from the SAF1 MessageResources instance in the servlet context
- An Interceptor that can apply SAF1 validations to SAF2 actions, converting error messages to SAF2 format.
- An Action and/or Interceptor that executes a Commons Chain instance.
Action 1 Emulation
- Implement SAF2 Action interface on SAF1 Action; Extend Session-Aware Interceptor to set properties corresponding to SAF1 execute parameters and populate ActionForm; Action
execute()
invokesexecute(...)
using properties; return ActionForward name. - Extend aforementioned SAF1 Action Interceptor to load and process PlugIns
Conversion Wizards
- Utilize XSLT and other text processing tools to convert
struts-config.xml
toaction.xml
,validations.xml
to a global SAF2validations.xml
, and Struts message resources to global SAF2resource.properties
. - ... convert SAF1 Action classes to session-aware SAF2 Action classes
- ... convert SAF1 JSPs to SAF2 JSPs (non-trivial!)
Next: Issues and Solutions
This page adopted from http://wiki.apache.org/struts/MigrationTools.