I have been trying to render tiles view with UrlBasedViewResolver for hours. Can anybody show me how it's done. I generally am trying to work this out
<bean id="tilesViewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView"></property>
<property name="prefix" value="/WEB-INF/jsp/"></property>
<property name="suffix" value=".jsp"></property>
<property name="order" value="1"/>
</bean>
<bean id="viewResolver" class="org.springframework.web.servlet.view.ResourceBundleViewResolver">
<property name="basename" value="views"/>
<property name="order" value="0"/>
</bean>
and in my views.properties file, I would have my other view paths which would be rendered by jstlView. here is the exception it's giving
javax.servlet.ServletException: Could not resolve view with name 'welcome' in servlet with name 'epub'
org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1042)
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:798)
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:552)
javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
this just wouldn't work though. It says that it can't render the view. I know it's not because of chaining 2 view resolvers and not because of tiles conf either. Because when I define tile's view class in view.properties file it would work. So I assume that urlbasedviewresolver and tilesview can't work together in some ways. I will have a lot of tile layouts so it's not really beautiful to define all of them in my properties file.(I will have few regular jsp pages so it's ok to use resourceBundleViewResolver) Any ideas?