struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jake Vang <vangj...@googlemail.com>
Subject Re: spring, struts2, convention plugin, how to "wire" an action class
Date Thu, 13 May 2010 12:08:51 GMT
> If you want Spring to create your action class (as opposed to Struts
> creating them) then you need to define your action in the
> applicationContext.xml file.

how do you do that? here's a couple of ways i have tried that do NOT work.

1. (normal, naive way that works for defining services)
<bean id="action" class="com.services.MyAction">
 <property name="propertyA" value="${propertyA}"/>
</bean>

2. (in this case, we do not use the id attribute, but the name attribute)
<bean name="/action" class="com.services.MyAction">
 <property name="propertyA" value="${propertyA}"/>
</bean>

i've also tried configuring struts.properties to have the
ObjectFactory use "spring" and this does not help.

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


Mime
View raw message