|
430 | 430 | ```
|
431 | 431 |
|
432 | 432 | 21. __About `InternalResourceViewResolver`__<br>
|
433 | | - The `InternalResourceViewResolver` is an implementation of `ViewResolver` in Spring MVC framework which resolves logical view name e.g. "hello" to internal physical resources e.g. Servlet and JSP files e.g. jsp files placed under WEB-INF folder. It is a subclass of `UrlBasedViewResolver`, which uses "prefix" and "suffix" to convert a logical view name returned from Spring controller to map to actual, physical views. |
| 433 | + The `InternalResourceViewResolver` is an implementation of `ViewResolver` in Spring MVC framework which resolves logical view name e.g. "hello" to internal physical resources e.g. Servlet and JSP files e.g. jsp files placed under WEB-INF folder. It is a subclass of `UrlBasedViewResolver`, which uses "prefix" and "suffix" to convert a logical view name returned from Spring controller to map to actual, physical views.<br> |
434 | 434 | *Important Points*:
|
435 | 435 | 1. When chaining ViewResolvers, an `InternalResourceViewResolver` always needs to be last, as it will attempt to resolve any view name, no matter whether the underlying resource actually exists.
|
436 | 436 | 2. The `InternalResourceViewResolver` is also the default view resolver of `DispatcherServlet` class, which acts as the front controller in Spring MVC framework.
|
437 | 437 | 3. By default, `InternalResourceViewResolver` returns `InternalResourceView` (i.e. Servlets and JSP) but it can be configured to return JstlView by using the `viewClass` attribute.
|
438 | 438 |
|
439 | | -22. |
| 439 | + |
440 | 440 |
|
441 | 441 |
|
442 | 442 |
|
|
0 commit comments