>>> http://struts.apache.org/2.0.11/docs/spring-plugin.html
>>
>> There isn't an option here to disable autowiring
>> (unless I'm missing something).

> In struts.xml use full class names for Action not names from spring
> xml config...all Actions will be create by internal Struts class factory.

Thanks for your reply. That works, I've split my struts.xml file so that I can 
change the configuration. In struts.xml I'm using:

    <constant name="struts.objectFactory" value="spring" />
    <include file="struts-actions.xml" />

And in a separate struts-test.xml I'm using:

    <constant name="struts.objectFactory" value="struts" />
    <include file="struts-actions.xml" />

This way I can use the same action declarations from struts-actions.xml for 
both testing and running the application.

Just a question on the design of this: Why is the Spring object factory 
configured to use auto-wire? From what I've read (both in the Spring 
documentation and other sources) this is not recommended practice because it 
makes applications harder to debug - the recommendation is to use explicit 
configuration using either the Spring config file or Annotations. Why did the 
Struts team choose not to follow these recommendations?

Cheers

Peter

_______________________________________________________________________
The information contained in this e-mail is confidential and may be privileged. 
It is intended for the addressee only. If you are not the intended recipient, 
please delete this e-mail immediately. The contents of this e-mail must not be 
disclosed or copied without the sender's consent. The statements and opinions 
expressed in this message are those of the author and do not necessarily 
reflect those of the company. The company does not take any responsibility for 
the views of the author.

Registered Office: IT-Freedom Limited, 9 Minster Court, Tuscam Way, Camberley, 
Surrey GU15 3YY 
Registered in England, Number: 04500346
_______________________________________________________________________

Reply via email to