tags:

views:

36

answers:

1

Currently in study of spring framework. I hope i can understand it properly and I think i need some help.

This is spring doc on bean concept.
http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/beans.html

This is spring doc on controller concept http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/mvc.html#mvc-servlet

In an real app how where their role arranged? do i use dispatcher servlet to handle all requests and use the beans as model? or the bean is also a controller and have all the business logic?

A: 

I suggest you have a read of this:

http://static.springsource.org/docs/Spring-MVC-step-by-step/

You'll get to see the DispatcherServlet and controllers in use. You are on the right track with your thinking - the DispatcherServlet handles all requests (it is basically a front controller).

Also, you seem to be getting confused over the word "bean". Beans are just normal Java objects that follow a convention for their getters and setters - http://en.wikipedia.org/wiki/JavaBean.

But follow that step by step and you'll get a good introduction into it.

Ben J