Defining ViewResolver in the Spring MVC

In Spring MVC, the DispatcherServlet delegates to a ViewResolver to obtain the View implementation based on the view name. The default ViewResolver treats the view name as a web application-relative file path, that is, a JSP--/WEB-INF/views/account.jsp. We can override this default by registering a ViewResolver bean with the DispatcherServlet. In our web application, we have used InternalResourceViewResolver, because it is related to the JSP view, but there are several other options available in Spring MVC, as mentioned in the previous section.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset