File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Application Frameworks and the fly likes spring and struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "spring and struts" Watch "spring and struts" New topic

spring and struts

Em Aiy
Ranch Hand

Joined: May 11, 2006
Posts: 226
a simple question: Why should we need struts if we are using spring as middle layer (for ioc and other things)??

The difference between <b>failure</b> and <b>success</b> is often being <b>right</b> and being <b>exactly right</b>.
David Newton

Joined: Sep 29, 2008
Posts: 12617

If you're using Spring MVC, you don't, unless you happen to like Struts better.

If you're just using spring for IoC and "other things" that don't include the web layer, then you still need a web layer.
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
If you use Spring Web MVC no need using Struts.

SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
Dawn Charangat
Ranch Hand

Joined: Apr 26, 2007
Posts: 249
Struts is an MVC for the web [presentation & controller] layer, as opposed to spring, which in itself is a huge collection of application frameworks with range from web, to database, IOC, AOP, OSGi, MVC to name a few. So if you use SpringMVC for your web layer MVC needs, then you wouldn't need to go for struts, as they pretty much are used for the same purpose [unless you have a personal inclination to one among them].
Em Aiy
Ranch Hand

Joined: May 11, 2006
Posts: 226
thanks for help ..
I agree. Here's the link:
subject: spring and struts
It's not a secret anymore!