struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "vikram bahadur (JIRA)" <>
Subject [jira] Commented: (WW-2407) "Could not find action or result" error when action name is the same as spring bean id
Date Mon, 23 Jun 2008 06:50:07 GMT


vikram bahadur commented on WW-2407:

editing the action mapping to add the following interceptor in struts.xml 

  <interceptor-ref name="params"/>
  <interceptor-ref name="validation"/>
  <interceptor-ref name="workflow"/>

helped me to come out from the same problem.

Vikram Bahadur

Quoted from:

> "Could not find action or result" error when action name is the same as spring bean id
> --------------------------------------------------------------------------------------
>                 Key: WW-2407
>                 URL:
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.11
>            Reporter: Mike M.
>            Priority: Minor
>             Fix For: 2.1.1
> 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(
> 	at com.opensymphony.xwork2.DefaultActionInvocation.invoke(
> 	at com.opensymphony.xwork2.interceptor.DefaultWorkflowInterceptor.doIntercept(
> 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.

View raw message