I have an action with an empty string for a name defined in the root namespace, and I want to redirect to this action from another action if a certain result is found, but it does not work.
Here's the default action
<action name="" class="com.example.actions.HomeAction"> <result name="success" type="freemarker">freemarker/home.ftl</result> </action>
And I define the redirection in the global results for the package:
<global-results> <result name="sendToRouting" type="redirectAction"> <param name="actionName"></param> <param name="namespace">/</param> </result> </global-results>
I tried to take out the actionName parameter, but this does not work. If I put a name for HomeAction and refer to it by name in the global results, this works, so I assume that the problem is that there is no action name for the redirect.
Any thoughts?
source share