Learning Spring Application Development by 2015

Learning Spring Application Development by 2015

Author:2015
Language: eng
Format: epub
Publisher: Packt Publishing


The preceding figure shows the flow of request handling in Spring MVC, along with its components. They are explained as follows:

Filter: The Filter component applies to every HTTP request. In the preceding sections, we will describe the commonly used filters and their purposes.

DispatcherServlet: The Servlet intercepts and analyzes the incoming HTTP request and dispatches them to the appropriate controller to be processed. It is configured in the web.xml file of any web application.

Local resolution and theme resolution: The configuration of i18n and themes is defined in DispatcherServlet file's WebApplicationContext. It provides support to every request.

Handler mapping: This maps the HTTP request to the handler, that is, a method within a Spring MVC controller class, based on the HTTP paths expressed through the @RequestMapping annotation at the method or type level within the controller class.

Controller: The Controller in Spring MVC receives requests from the DispatcherServlet class and performs some business logic in accordance with the client.

ViewResolver: The ViewResolver interface of Spring MVC supports view resolution based on the view name returned by controller. The URLBasedViewResolver class supports the direct resolution of view name to URLs. The ContentNegotiatingViewResolver class supports the dynamic resolution of views based on the media type supported by the client, such as PDF, XML, JSON, and so on.

View: In Spring MVC, the View components are user-interface elements, such as textbox items and many others, which are responsible for displaying the output of a Spring MVC application. Spring MVC provides a set of tags in the form of a tag library, which is used to construct views.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.