Spring is a framework for developing enterprise applications. One of the main targets of spring is to reduce the amount of code the user has to write, so they developed a lot of templates (like a JDBC template and a Hibernate template) so that you won't need to write a lot of unnecessary code over and over again.
Spring also has many modules. The main two modules are the inversion of control container and the aspect oriented programming module. It also has a web MVC framework.
Spring has nothing to do with struts. It integrates well with struts. Spring MVC is a web mvc framework that could be compared to struts, but not spring as a whole.
What is the difference between them ?which is easier?Does both have same work?Where and when we use either of them?
Joined: Jan 28, 2008
This is like comparing apples with oranges. Spring is an application framework, which helps you integrated different technologies for the different layers of your project (presentation layer, service layer, data access layer, etc). It provides a dependency injection container and AOP. It also ships with a lot of utility classes that speed up your development. As for struts, it's a request based MVC web framework.
Finally, I believe that you already know enough about struts from your posts on that subject in several different topics, like your two posts in the book review of "Struts 2 Design and Programming" by Budi Kurniawan