I know Struts 2 make automatic mapping from request parameter to action class fields using param
interceptor. But what if I want to map a parameter to an action
Use the alias interceptor, nutshell:
<action name="someAction" class="com.examples.SomeAction">
<!-- The value for the foo parameter will be applied as if it were named bar -->
<param name="aliases">#{ 'foo' : 'bar' }</param>
<interceptor-ref name="alias"/>
<interceptor-ref name="defaultStack"/>
<result>result.jsp</result>
</action>