Spring MVC Application Flow With Diagram
I will explain ‘Flow of typical Spring MVC application’ or in other words ‘How exactly user gets served?’. We will see how data and control flows through all the stages of this process. Let me start with one diagram,

Here’s the transition explanation below,
- Transition 1 – User sends request to server by submitting form / by clicking hyperlink etc. Request is initially given to WEB.XML.
- Transition 2 – WEB.XML routes request to DispatcherServlet by looking at <servlet-mapping> tag.
- Transition 3 – Inside DispatcherServlet, First ‘HandlerMapping’ handed over request to suitable ‘Controller’.
- Transition 4 – Controller maps request to proper Model class. All BUSINESS LOGIC is done inside Model class.
- Transition 5 – If database operation is needed then Model class will route request to suitable DAO. All database operations should be carried out in DAO.
- Transition 6 – If needed then attach attributes into request/session/application scope and return back to Model.
- Transition 7 – If needed then attach attributes into request/session/application scope and return back to Controller.
- Transition 8 – Controller simply returns it to any View(JSP/HTML etc).
- Transition 9 – JSP/Html is viewed back to user.
I will post related Spring MVC sample application soon.
















25 Comments
Balaji
07.24.2010
Excellent and basic diagram which helps every one to understand the Spring MVC flow
cmreddy
01.12.2011
WOW, Wonderful. I am new to spring MVC. Right now I have understood the basic flow of spring mvc.
S@tish
03.04.2011
nice flow everybody can easily understood.
ThankQ
Srinu
04.29.2011
Super,I understood very well at this Time
Bhargav
08.11.2011
its good. An example application gives much better understand.
Namrata Shah
09.05.2011
Hey Gaurang,
Thanks for this explanation. I first time exactly got the flow of spring mvc. good written skill yeah…
Prashant
10.18.2011
Where are filters , Interceptors, ViewResolvers ?
pradeep
03.08.2012
very good and it is helpful for all..i got lots clarity from that digram
naveen
06.19.2012
Nice explanation
Anand Singh
06.28.2012
Very Nice Explanation
satya
07.10.2012
thank you,
it is very easy to understand for new spring developer.
Chandra Sekhar
07.19.2012
Excellent I’m very much clear about the Spring MVC flow after reading this..Thank you very much.
pavan
07.28.2012
wow…i like u ….super
jyothikumar
07.31.2012
nice explaination very vry vry thanks
sagar srinivas
08.02.2012
Excellent in explaining spring mvc.
I am first to study spring. I really understood.
Thank u
shashi
09.18.2012
it was ecstatic..thanx..
karnakar Reddy
10.26.2012
thank you,
it is very easy to understand for spring MVC developer.
Balakrishna
11.22.2012
fantastic spring with mvc flow i realy appreciate.
Dharmendra
12.18.2012
nice but give more example….
Sonal
01.18.2013
nice demo
sumit
02.08.2013
Excellent explanation
Rajeshreddy
02.20.2013
ok,but where is view resolvers and Dispatcher servlet does not communicate with controller
Rajeshreddy
02.20.2013
D.s comm with handler Adapter after comm with controller
Mukesh Koshy M
02.28.2013
Very simple explination with flow. Excellant
Alok Gaur
05.03.2013
Its a very simple and nice explanation for a person wo is new to Spring MVC.
There are no trackbacks to display at this time.