0 votes
in Spring by

How would you relate Spring MVC Framework to MVC architecture?

1 Answer

0 votes
by

As the name suggests Spring MVC is built on top of Model-View-Controller architecture. DispatcherServlet is the Front Controller in the Spring MVC application that takes care of all the incoming requests and delegate it to different controller handler methods.

The model can be any Java Bean in the Spring Framework, just like any other MVC framework Spring provides automatic binding of form data to java beans. We can set model beans as attributes to be used in the view pages.

View Pages can be JSP, static HTMLs etc. and view resolvers are responsible for finding the correct view page. Once the view page is identified, control is given back to the DispatcherServlet controller. DispatcherServlet is responsible for rendering the view and returning the final response to the client.

Related questions

0 votes
asked Jul 28, 2020 in Spring by sharadyadav1986
0 votes
asked Apr 4, 2021 in Spring by Robindeniel
...