Actually the question is missing too much information for anyone to actually answer.
In general the Controller passes the model data to the view and gets the model from the view. The model is the model, it is your domain objects.
But when you say MVC, you don't say Spring MVC, or Swing MVC, or Struts, so it is too vague to give specific examples. Which would take too long anyway.
Ram ank wrote:my question is cant we integrate controller and model to be in same module
i.e use same technology like servlets for both.
lets say it is spring MVC
I actually missed that the question started with "why"
Why do we separate anything in Java, we can create just one class with one method and write all our code in that one method. But it is not good OO design, it will cost way too much to maintain that type of code. We separate concerns, so Model is a concern about holding the data of the application. Where the concern for a Controller is passing those data between the back end, say database, and the front end UI. Any coupling between them makes code more brittle and tough to enhance and maintain.
Mark
Bear Bibeault
Author and opinionated walrus
Marshal