"Could not find action or result" error when action name is the same as spring
bean id
--------------------------------------------------------------------------------------
Key: WW-2407
URL: https://issues.apache.org/struts/browse/WW-2407
Project: Struts 2
Issue Type: Bug
Affects Versions: 2.0.11
Reporter: Mike M.
Priority: Minor
For some odd reason, when the action name in my struts.xml is the same as the
spring bean id in applicationContext.xml, I get an error. However, if I change
the name of the action in my form and in the struts config to something else,
then everything works as expected.
Here is an example:
struts.xml:
<action name="selfRegister" class="selfRegister">
<result
type="freemarker">/view/SelfRegThanks.ftl</result>
<result name="input">/view/index.ftl</result>
</action>
applicationContext.xml:
<bean id="selfRegister" scope="prototype"
class="org.bogus.controller.SelfRegister"/>
and the error:
2008-01-08 08:50:34,848 ERROR
org.apache.struts2.dispatcher.Dispatcher.serviceAction - Could not find action
or result
No result defined for action org.bogus.controller.SelfRegister and result
success
at
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:350)
at
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:253)
at
com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(DefaultWorkflowInterceptor.java:221)
If I just change the action name to selfRegister1 in my form and struts.xml it
works.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.