posted 16 years ago
Hello,
Dependency injection in Struts action classes can be used to inject dependencies such as business delegates and other helper classes.
Even you can inject some configuration properties as well in the Struts action classes.
There three ways to achieve this
1) Using Spring Action Support classes.
2) Using DelegatingRequestProcessor
3) Using DelegatingActionProxy = I have used this one earlier in one of the projects. This is the best way suggested to use DI in struts. In this approach you declare map the type attribute in action-mappings to the spring class DelegatingActionProxy and declare the action class as spring beans in spring configuration file.
Thnx
amit