Search code examples
springstruts2struts2-spring-plugin

Can we integrate Struts 2.0 with Spring 3.0 +


I am new to Struts . Can we integrate Struts 2.0 with Spring 3.0 + . I am hearing people say "it is not possible to integrate it". Is this true .

If so is there any tutorial on the web having an example ?

edit :

There is a plugin to integrate Struts 2 and Spring 2 (struts2-spring-plugin-2.0.11.2.jar) . Do we have similar one for Struts 2 and Spring 3


Solution

  • Well we always can use Spring 3.x with Struts 2.x and Struts2.x has already a plug in in place to accomplish this.

    here is the link Struts2 spring Integration

    Struts2 use its internal DI for creation of Actions,Results,Interceptor using the plug in will delegate the call of creation of these key objects to Spring DI. hope this will help you

    edit

    The Strus2 Spring Plug in works well even with Spring 3.x and we are using this in our current application it actually use your Spring jars and you have to place them in the lib.This plug in just overrides Struts2.x Object factory which is responsible for creating struts2 core component. So just go ahead do some experiment with it and if you face problem in integrating you can always post queries here