So I'm trying to create an action redirect that has dynamic parameter names as well as values. I understand how to do this in the struts.xml file for parameter values, but cannot seem to get things to evaluate correctly for the parameter name.
<action name="SaveObject" method="save"
class="com.mysite.actions.ObjectAction">
<result name="success" type="redirectAction">
<param name="actionName">${actionName}</param>
<param name="${paramName}">${paramValue}</param>
</result>
</action>
Now the ${actionName} and ${paramValue} I have absolutely no issue with. actionName, paramValue, and paramName all have appropriately named getters/setters inside the ObjectAction.
Does anyone know how I can get the ${paramName} to evaluate correctly? It currently shows up as "${paramName}" in the URL and I need it to be the value of the paramName variable. I've tried using #paramName and %{paramName} due to my misunderstanding of OGNL and they all show up incorrectly in the URL as well. I've also tried adding a parse=true parameter, but I believe Struts 2 does that be default anyway.