Java Mailing List Archive

http://www.gg3721.com/

Home » Struts Users Mailing List »

Struts2 and spring plugin - Action class
[springManagedProsocActionUpdateEmail] not found

doahh

2008-08-04

Replies: Find Java Web Hosting

Author LoginPost Reply

I am trying to get spring to manage my Struts2 actions but am getting the
following error:

Action class [springManagedProsocActionUpdateEmail] not found

I have used the http://struts.apache.org/2.x/docs/spring-plugin.html
http://struts.apache.org/2.x/docs/spring-plugin.html as a guide but have
cross referenced that with the book 'Struts 2 In Action' and for me it
doesn't work. These are the things I have done to configure spring with
Struts2.

1) Added the struts2-spring-plugin-2.0.11.1.jar to my lib folder;
2) Added the following to my spring-config file:

<bean id="springManagedProsocActionUpdateEmail"
class="uk.co.prodia.prosoc.struts2.action.ActionUpdateEmail">
    <property name="sessionFactory" ref="sessionFactoryProsocForum"/>
</bean>

3) Added the following to my struts.xml file:

<constant name="struts.objectFactory"
value="org.apache.struts2.spring.StrutsSpringObjectFactory" />

4) Modified the action class attribute to point to the id of the bean in the
spring-config file so that it looks like the following:

<action name="update-email!*" class="springManagedProsocActionUpdateEmail"
method="{1}">
  <results in here ... ...>
</action>

5) Set the following constant in my struts.xml file:

<constant name="struts.objectFactory.spring.autoWire" value="type" />

6) Set the following property on my spring-config <beans
default-autowire="autodetect"> tag.

Have I been really dense and missed out a step even after going through the
book and the web guide twice each?
--
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)

©2008 gg3721.com - Jax Systems, LLC, U.S.A.