Spring Framework

Spring Projects

Spring Project 1

InternalResourceViewResolver in Spring MVC
Previous Home Next

This view resolver subclass of UrlBasedViewResolver that supports InternalResourceView and subclasses such as JstlView and TilesView. This view resolver provide the facility to add the prefix of the view name and add the suffix of the view name.

Syntax:

public class InternalResourceViewResolver
extends UrlBasedViewResolver

This view resolver provide the following method:

requiredViewClass:

protected Class requiredViewClass()

setAlwaysInclude:

public void setAlwaysInclude
(boolean alwaysInclude)

buildView:

protected AbstractUrlBasedView buildView
(String viewName)throws Exception

 

Example

<bean id="viewResolver"
class="org.springframework.web.servlet.
view.InternalResourceViewResolver" >
<property name="prefix">
<value>/WEB-INF/pages/</value>
</property>
<property name="suffix">
<value>.jsp</value>
</property>
</bean>

Example of InternalResourceViewResolver in Spring MVC

Previous Home Next

Tolal:0 Click:

Show All Comments

Did not find what you were looking for leave your name and message. We will revert within 24 hours
Name:
eMail:
Comment / Feedback: