Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering Unit Testing Using Mockito and JUnit

You're reading from  Mastering Unit Testing Using Mockito and JUnit

Product type Book
Published in Jul 2014
Publisher
ISBN-13 9781783982509
Pages 314 pages
Edition 1st Edition
Languages
Author (1):
Sujoy Acharya Sujoy Acharya
Profile icon Sujoy Acharya

Playing with Spring MVC


In Spring MVC, the following is a pattern of a simplified request handling mechanism:

  1. DispatcherServlet receives a request and confers the request with handler mappings to find out which controller can handle the request, and then passes the request to that controller.

  2. The controller performs the business logic (can delegate the request to a service or business logic processor) and returns some information back to DispatcherServlet for user display or response. Instead of sending the information (model) directly to the user, the controller returns a view name that can render the model.

  3. DispatcherServlet then resolves the physical view from the view name and passes the model object to the view. This way, DispatcherServlet is decoupled from the view implementation.

  4. The view renders the model. A view could be a JSP page, a servlet, a PDF file, an excel report, or any presentable component.

The following sequence diagram represents the flow and interaction of Spring MVC...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}