I have multiple view resolvers in a Spring configuration and wanted to use different view resolvers for different requests.
Example: For URLs starting with report_*
, use Birt view resolver, and for ajax calls use Tiles resolver and so on.
Tried setting order property, but all views are resolved by tilesViewResolver
.
<beans:bean id="tilesViewResolver" class="org.springframework.js.ajax.AjaxUrlBasedViewResolver">
<beans:property name="viewClass" value="com.example.example.util.AjaxTiles21View"/>
</beans:bean>
<beans:bean id="birtViewResolver" class="org.eclipse.birt.spring.core.BirtViewResolver">
...
<beans:property name="order" value="2" />
</beans:bean>
<beans:bean id="beanNameResolver" class="org.springframework.web.servlet.view.BeanNameViewResolver">
<beans:property name="order" value="1" />
</beans:bean>