Using Struts2 and Spring together


Web tier: servlets, JSP, Web frameworks: Using Struts2 and Spring together

  1. Using Struts2 and Spring together (4 messages)

    We plan to use a mix of Struts and Spring, somewhat of the best of both worlds approach, to develop a new Web application that has a heavy UI, light middle tier and lots of DB stored procedure calls. We have decided to use Sturts2 for MVC along with freemarker templates, themes, AJAX integration and validation and Spring for DAO layer, DI to the action classes and to manage the DB connectivity. Seems to be working well in the prototype phase but would like to check with the larger community if anyone else is using this approach and if you see any major potential issues with it. Thank you for your responses.
  2. not sure your u mean you want to use Spring web flow with stuts? Spring(and not Spring Webflow ), does not cross over to the presentation tier(JSPs) at all..Spring is a J2EE framework that is for the middle tier.. if you really meant mix spring webflow and struts, i dont see why you would want do to that..just stick with one MVC framework for your presentation tier..
  3. Hi Jeryl, We have bundled Struts-2 and Spring together using pieces from each of them. We use the Struts-2 controller but Actions and the wiring are done via Spring in the MVC. We use the Struts-2 building blocks for AJAX, like tabbed panel, remote div, remote form, validation in form of tag library and others. Of course, this could be fused into Spring but comes out of the box in Struts-2. We seem to have concluded Struts-2 makes a very good use of freemarker templates and gives better integration with AJAX UI theme, which is extremely useful when functional and visual development are done completely independently. We use Spring's DI, AOP and Spring JDBC to connect to the data sources. Our prototype is behaving very well, seems to suit our project and the way it is being developed, and the learning curve of an extra framework has not been significantly bigger. We think we are using the best of both worlds. I am looking to find if there are any fundamental design flows with this approach. Thank you, Ilia
  4. Hi Ilea, I saw your posting, its good choice i think. I too wanted to build a framework like that. I mean i want to use Struts 2.0 for UI and Business Logic is Spring. But I am new to spring, can i succed in that. And my doubt is, have you implemented JPA and have you written DAo classes directly. Can you give me description regarding that. Thanks in Advance Ratna
  5. If you want to use Ajax in the Front-Tier I really recommend you JSF. It's very powerfull and there a lot of frameworks for Ajax (see