I am building struts2 parameters values from variables and in one case it works and in the other it doesn't. Here is the 'result' from a menu item click :
<result name="WidgetList" type="redirectAction">
<param name="actionName">actList</param>
<param name="object">Widget</param>
</result>
And the Action mapping :
<action name="actList" class="MyClass" method="execute">
<interceptor-ref name="newStack" />
<result name="success">
<param name="location">jsp + ${object} + List.jsp</param>
</result>
<result name="Edit" type="redirectAction">
<param name="actionName">actEdit + ${object}</param>
</result>
</action>
In the 'Edit' result (which is returned after the user clicks a Widget in the list) the actionName is built correctly and that action runs to display a page.
actEdit + ${object}
becomes :
actEditWidget
However the menu click that redirects to 'actList' does NOT get build correctly, even though the ${object} parameter is correctly replaced.
jsp + ${object} + List.jsp
becomes the string :
"jsp+Widget+List.jsp"
And I get :
HTTP Status 404 - /MyApp/jsp+Widget+List.jsp
Why does this work in one case and not the other... and how can I 'fix' this?