Posted By

tedg on 12/10/13


Tagged


Versions (?)

Using Tiles with Spring MVC


 / Published in: Java
 

The way to tell Spring MVC to resolve logic view names to Tiles "definition" name is, in a DispatcherServlet configuration file, define a bean of type UrlBasedViewResolver with viewClass org.springframework.web.servlet.view.tiles2.TilesView

  1. <bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
  2. <property name="contentType" value="text/html;charset=utf-8"/>
  3. <property name="order" value="10"/>
  4. <property name="requestContextAttribute" value="requestContext"/>
  5. <property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView"/>
  6. </bean>

Report this snippet  

You need to login to post a comment.