This week's book giveaway is in the OCMJEA forum. We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line! See this thread for details.
wanted to know, 1. is spring used for web applications or desktop applications ? 2. what is it mostly used for ? 3. where does it fit in ? (like say, struts fits in both the view and controller layers)
Well there are many Spring modules/projects besides core Spring.
Spring can be used in any environment, web or stand-alone. Core Spring is about creating POJOs to do your work. These POJOs work together and are loosely coupled by Spring managing and injected the POJOs together to form your application. Spring also allow you to add enterprise services without the need for any external server product.
Spring MVC is the Struts equivalent, without tying your code to a specific technology.
Spring also makes other technologies easier to use, like RMI, JMS, Web Services, client access to EJB 2.x.