Newsletter |
Spring MVC Execution Flow Diagram, Spring MVC 3.2 Flow
Let us see the flow of spring MVC (3.2). I am not going to describe what is M,V,C π hope you already know that mess right ? so lets start with the flow…
Spring MVC 3.2 Execution Flow
Step 1: First request will be received by DispatcherServlet
Step 2: DispatcherServlet will take the help of HandlerMapping and get to know the Controller class name associated with the given request
Step 3: So request transfer to the Controller, and then controller will process the request by executing appropriate methods and returns ModeAndView object (contains Model data and View name) back to the DispatcherServlet
Step 4: Now DispatcherServlet send the model object to the ViewResolver to get the actual view page
Step 5: Finally DispatcherServlet will pass the Model object to the View page to display the result
That’s it π
Just remember this diagram for the interview purpose, i will explain you the practical flow in the first example.
You Might Also Like
::. About the Author .:: | ||
Dear sir,
Itβs a good site who is learning for the first time.
Thanks & Regards
ramesh
hi,, thanks for the info.. well explained
Thanku very much, it is very nice and easy to understand…….
Hi Sivateja
when Web Sevices tutorial will come…please confirm me bcoz i am waiting & crazzy…plzzzz. or other wise give any reference to read web services in easy language & concept like your site
Good Its very helpfull to us…
Hi,
For beginners the flow diagram explanation is nice and good. Easy to grab.
Thanks a lot for this introductory article and it helped me lot to understand.
Thanks for posting such a nice article.
It helped me a lot to get the overview.
Hi can you able to tell me Which dependency is better among setter and Constructor.Why?
setter injection is having more benefits than constructor…..
1.If we use constructor we have to pass all parameters,but in case of setter we can pass required one's.
2.Memory is managed efficiently than to constructor as we set required fields.
I think is enough……
If bean class contains only one property or if all the property of bean class should participate in dependency injection then go for constructor injection, because constructor injection is very faster than setter injection.
If bean class contains more than one property and there is no need of making all properties participating in dependency injection, then we need to go for setter injection
Its good for beginners:)
If suppose we can use spring with structs using our applications for this which controller servlet will be execute please tell me it s one of the intvw question
struts2 filter is used and springs org.springframework.web.context.ContextLoaderListener class should add in wb.xml and struts2 spring pugin jar is added in the class path.
what is exact difference between Inversion Of Control(IOC) and Dependecy Injection(DI)
Please give me answer as soon as possible.
Thanks in adv..
Dependecy Injection(DI) is one type of Inversion Of Control(IOC).
hai .it’s very nice ..now i understood the way of flow…i have one doubt while developing project we have use dependency or jar files which is best…….
I have a very bad confusion In spring MVC I use println method in every statement of command class setter and getter method I have a home page where I have use a link to go to login page when I click on link then control forward to login page and there is only two fileld I have declared so why getter method of user name and password called 4-4 times ..pls help me out.
Thanks lot gaving explanation…can u able to gave a small example with spring mvc and hibernate with annotations
Thanks.. it’s a good example for beginners
nice example
Very easy to understand.. π
Thanks, nice example
Ya its really nice site to upgrade the skills set.
its very nice.
Thanks&Regards
Poocholamannan.J
Can you please upload content for Spring autowiring with annotation
Thanks.
Thank u very much ,easy to understand
Thank u for such a simple and powerful explanation.
what i can say its awesome ….!and easy to understand…!!
Thank You very much, nice explaination
Hi,
it real good explanation for Java/J2ee develpers
Thanks a lot …… It’s awesome…..
good exmple for beginners
Well explained and easy to understand.
sir it is good but in interviews they ask Boot strapping of Spring MVC (how internally context loader listener,dispatcher servlet is build for handing request )
easy to learn.. great website
Hi,
It’s very good website for learning java.
Please add all concepts in spring-mvc
Hi,
it is dam easy for beginners.specially it is very good website for learning hibernate,struts2
this flow chart is really very intuitive and helpful, thanks
BTW, is there any updates for spring 4. π
How dispatcher servlet knows which controller has to be executed , if there are multiple controllers present ?
Hi,
All dear this pictorial representation and short Explation are easy and understandable —thanks java4s.com team
Hi,
Thanks for your easy understanding materials
Please add the JSF materials also.
Great tutorial sir , Thanks
Really very nice explaination……..
Hi,
Thanks for your easy understanding materials
Please add Play Framework materials also.
hi,
Thanks for your site .but i am seriously searching about learn DOJO But,is is not explained very well in other sites.So kindly introduce DOJO technoligy in this site .
Thank you again.
bigginer can understand easily
your blog is very helpful to all java developers. thank you….
@Sivateja Kandula Hi Siva teja, You are providing very nice tutorial which will help developers a lot. It’s very small but i couldn’t stop my self to say thanks to you buddy.
Good Explanation
Hi Sivateja,
I have a query. How to disable copy/paste option in text field in jsp.
Maaasth tutorial I LOVE IT
how to map jsp request to dispatcher servlet
Good to understand the flow of spring mvc in project (-_-)
It was really helpful thanks
Thank u so much for such a good explanation
Hi,
thanks for the explanation it is very much understandable,I want to know in depth about dispatcherServlet and HandleMapping, please suggest me some website.
This site is really as a person who teaches us similar Directly. I am happy to learn from the site. best of luck
Its very good for beginners and easy to grap.
It is very easy way to understand the flow of the spring mvc….
thanks to all
super explanation
It is really nice.. Thank u…
It is good for beginners easy to understand….
hi i am regular user of java4us.com….i have one dought by reading this tutorials how to implement in real time java projects
It’s easy to understand..
its very nice and way of explanation is very good
I think this is the simple and easy explanation for MVC to understand easily
Thanks for the good words! Really appreciated. Great post. I ve been commenting a lot on a few blogs recently, but I hadnt thought about my approach until you brought it up.
Nice explanation to understand ..Thank you
Nice explanation for understanding…thanks
nicely elaborated the concept. Easy to understand for the beginners.
simply superb.. good to grab the concept easily..
thanks a lot
Hi Siva…..
Why this much of classes are required …..already existing mvc like (servlets ,JSP, and struts frameworks)
are having Model View Controller three things only….but here we have no of new classes like Model , ViewResolver, etc…came.
Could you please explain each thing clearly and which purpose these are userful….
Many Thanks,
YashodaKrishna D.
Java Dev.
Thanks for gud explanation……
That's really a good site and really good explanation of spring MVC floaw.
Thanks
really nice explanation,, easy to understand and remember
Understandable explanation and diagram.
After completing the processing of the request from controller class that class returning the Model obj and view name, then DispatcherServlet receives that and view name sends to ViewResolver but in above you said model object return to the ViewResolver is it correct or not.
Hi Siva,
Spring MVC 3.2 Execution Flow in that Step 4: not sending that model object to viewResolver. That is view name sends to the ViewResolver.
hi,
such a nice explationation it is helpful me.
Spring MVC flow nicely explained..
good explain but not more explaintion
nice explanation sir……thanks…!
Hi buddy can u tell me how to connect ui part with java .
It's very helpful for students and also for expreince Guy
Nice explanation… Thank you…:)
Nice explanation.. thank you Shiva
thank you very much,its too easy to understand
nice explanation.It is used to every one
Nice
How set default controller in Spring MVC ?
Thanks
This site good for learning..Thank you sir
Thanks brother for providing such a best tutorials which will understand everyone i.e freshers or experience people also .Very clear explanation about everything
Thank you very much,it's too easy to understand.
Thank u brother… best tutorial java4s … easy to understand.
Good Explained
Explanation is very good.
Very clear explanation and nice diagram