June 2018
Intermediate to advanced
408 pages
11h 23m
English
To configure ViewResolver, we need to specify a bean for the class InternalResourceViewResolver in the spring-mvc-context.xml file, after <mvc:annotation-driven />. Let's do that:
<beans><!-- Schema definitions are skipped. --><context:component-scan base- package="com.packt.springhighperformance.ch4.controller" /><mvc:annotation-driven /><bean class="org.springframework.web.servlet.view.InternalResourceViewResolv er"> <property name="prefix"> <value>/WEB-INF/views/</value> </property> <property name="suffix"> <value>.jsp</value> </property> </bean></beans>
After configuring ViewResolver, we will create a Controller to test the configuration. But, before moving on to that, let's see the Java-based configuration.
Read now
Unlock full access