So, I'm trying to create an action redirect with dynamic parameter names as well as values. I understand how to do this in struts.xml for parameter values, but cannot force things to evaluate the parameter name correctly.
<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 $ {actionName} and $ {paramValue} I have absolutely no problems. actionName, paramValue and paramName are all appropriately named getters / setters inside an ObjectAction.
Does anyone know how I can correctly evaluate $ {paramName}? Currently, it appears as "$ {paramName}" in the url, and I need this to be the value of the paramName variable. I tried using #paramName and% {paramName} due to my misunderstanding of OGNL, and they all also display incorrectly in the url. I also tried adding the parameter parse = true, but I believe that Struts 2 will still be the default.
source share