Hi, I am working on a Struts migration project from Struts 1.2.x to Struts 2.3.x and need your feedback on the below. Could you please help me on this regard?
*Background:* In our application, the struts-config.xml (Struts 1.2.x) has custom "action" tags which were parsed and the corresponding classes were set using the Commons Digester/RuleSet. The "action" in struts-config.xml (Struts 1.2.x) looks something like below: // simple action with forward <action path="/login" forward="login"/> // action class with custom tags <action path="/index" type="com.test.struts1.action.My <http://com.test.struts1.action.my/>Action"> <tag1 key1="value1" key2="value2" key3="value3"> <tag2 key1="value1" key2="value2" /> <tag3 key1="value1" key2="value2"/> </tag1> <forward name="success" path="/sample.jsp" /> </action> The above "action" tags (tag1, tag2, tag3 etc. along with key value pairs) were processed using (similar) Commons Digester/RuleSet code below: digester.addObjectCreate( "struts-config/global-forwards/forward", forwardClass, "className" ); digester.addSetProperties( "struts-config/global-forwards/forward" ); digester.addSetNext( "struts-config/global-forwards/forward", "addForward", "org.apache.struts.action.ActionForward" ); digester.addSetProperty( "struts-config/global-forwards/forward/set-property", "property", "value"); We would like to implement similar functionality in Struts 2.3.x to match with that of above: <action name="index1" class="com.test.struts2.action.MyAction"> <tag1 key1="value1" key2="value2" key3="value3"> <tag2 key1="value1" key2="value2" /> <tag3 key1="value1" key2="value2"/> </tag1> <result name="success">/sample.jsp</result> </action> *Question:* What is the best way to implement similar functionality in Struts 2.3.x (Struts.xml)? How do we tell the Struts framework to recognize the new "action" tags and pass the values to be set on the corresponding "action" class? Any help is sincerely appreciated. Thanks in advance.