Why do we need view resolver in spring mvc and what is an internal view resolver in spring?



Why do we need view resolver in spring mvc and what is an internal view resolver in spring?..

Answer / Kanchan Mala

The ViewResolver interface in Spring MVC is responsible for resolving a requested view name into a concrete implementation of the javax.servlet.jsp.JspException or org.springframework.web.servlet.View interface. It helps to simplify the management of views and eliminates the need for developers to manually search for views within the application context. An InternalResourceViewResolver is an implementation of ViewResolver that looks for views in the classpath of the application, typically in directories defined by the prefix and suffix properties of the resolver.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Spring Framework Interview Questions

Why do we use thymeleaf?

1 Answers  


Why @component is used in spring?

1 Answers  


What is the use of @autowired annotation in spring?

1 Answers  


What is @repository in spring boot? : Spring Boot

1 Answers  


What is the difference between model and modelmap in spring?

1 Answers  


Why do we need spring batch?

1 Answers  


Is spring boot better than spring? : Spring Boot

1 Answers  


Why interceptors are used in spring?

1 Answers  


What is application properties file in spring boot? : Spring Boot

1 Answers  


Why is spring light weight?

1 Answers  


What is @springbootapplication in spring boot? : Spring Boot

1 Answers  


Tell us about spring security.

1 Answers  


Categories