Home > Guides > Migration Guide > Migration Tools

Struts 2 migration tools include the notions of

  • bridge objects to utilize existing s1 resources, and
  • utilities to convert resources to s2 equivalents.

(warning)

This is a whiteboard describing tools that volunteers might write, given sufficient interest.

Dual Processor, Shared Resources

  • A s2 TextProvider that retrieves messages from the s1 MessageResources instance in the servlet context
  • An Interceptor that can apply SAF1 validations to s2 actions, converting error messages to s2 format.
  • An Action and/or Interceptor that executes a Commons Chain instance.

Struts 1 Emulation

  • Implement s2 Action interface on s1 Action; Extend Session-Aware Interceptor to set properties corresponding to s1 execute parameters and populate ActionForm; Action execute() invokes execute(...) using properties; return ActionForward name.
  • Extend aforementioned s1 Action Interceptor to load and process PlugIns

Conversion Wizards

  • Utilize XSLT and other text processing tools to convert struts-config.xml to struts.xml, validations.xml to a global s2 validations.xml, and Struts message resources to global s2 resource.properties.
  • ... convert s1 Action classes to session-aware s2 Action classes
  • ... convert s1 JSPs to s2 JSPs (non-trivial!)

Next: Struts 1 Solutions


This page adopted from http://wiki.apache.org/struts/MigrationTools.