I know why we need to use MVC model in our web application but there are some points which I am not able to get . I know in MVC model we use javabean as Model,jsp page as View,servlet as controller but how to arrange them in link.
As an example for my problem lets take a simple login page . For view , a jsp page contains 2 textfields and a submit button .Now when user enters his username and pasword ,the data should be passed to the controller i.e a servlet.
Now the problem I have are :
1 . for the validation , we pass the data as arguments from controller to a javabean we have created as Model . Now should we pass the result back to the controller or directly to the jsp page through javabean . I mean, should it be like every reponse/request should first be passed to the controller and then controller should handle them .I am confused .
2. In what cases ,for example, we should let javabean commmunicate directly with jsp page as shown in the diagram here
http://en.wikipedia.org/wiki/Model-view-controller . Because doing so will leave no role of a controller which should be used in MVC model .
May be my problem is that I am not able to clearly understand the relationship between Model-View-Controller . So please help .