Java Reference
In-Depth Information
<bean id="viewResolver" class="org.springframework.web.servlet.view. å
XmlViewResolver" />
If the application uses only JSPs, then maintaining an external view mapping configura-
tion is not necessary. The InternalResourceViewResolver class can determine the physical
view in the web application archive given the logical view name. Using this view resolver
is just a matter of configuration, as shown in Listing 3-15.
Listing 3-15. insurance-servlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns=""
<bean name="viewResolver" class="org.springframework.web.servlet.view. å
<property name="viewClass" value="org.springframework.web.servlet.view å
<property name="prefix" value="/WEB-INF/jsp/"></property>
<property name="suffix" value=".jsp"></property>
<bean name="/" class=" å
Note that the InternalResourceViewResolver also returns JstlView . It inherits two
optional properties—prefix and suffix—from UrlBasedViewResolver to completely resolve
the physical resource. In this case, the view name policydetails will map to a physical
resource /WEB-INF/jsp/policydetails.jps . This view resolver can also be used with views
composed using the Apache Tiles layout framework.
Search WWH ::

Custom Search