struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boa <mousketeer...@yahoo.com>
Subject struts2 action and spring bean
Date Thu, 02 Nov 2006 03:27:45 GMT

Hi there,

I am using struts2.0.1 and spring1.2.8.  I follow the showcase example in
struts2 config file to use bean name instead of fully qualified classname
for action, then I get Action class [XXXAction] not found.

My spring config file is like this:

<beans default-autowire="autodetect">	
     <bean id="displayPageAction"
class="com.bofa.ecomm.snf.app.contentmanager.DisplayPageAction"
singleton="true" lazy-init="false">
	<constructor-arg index="0" value="test" />
     </bean>	
</beans>

struts config is like this:

        <action name="DisplayPageAction" class="displayPageAction">
            <result name="success" type="tiles">Main</result>
        </action>

I can see from the console that the spring bean "displayPageAction" is
initilalized,  when I try to access the struts action using url:
http://..../DisplayPageAction.action

I get "Action class [displayPageAction] not found " error.

Does anyone has similar experience on how to resolve it?  Thanks.

Alex
 
-- 
View this message in context: http://www.nabble.com/struts2-action-and-spring-bean-tf2557529.html#a7127210
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message