Hi,
I am new to Spring. Tried a Tiles example. Having a query. Lets say, I am returning a logical name 'showTilePage' from the controller and I have two resolvers declared InternalResourceViewResolver or TilesViewResolver. How DispatcherServlet will know which resolver to consult for a particular logical view name? Is that logical view name is unique among all the controller's view names?
When I tried below example I returned logical view name 'showTilePage' and template
jsp name was different. I thought it will pick the 'showTilePage' below definition and will render the parent template's jsp that was something different earlier. But to my utmost surprise, it was asking for showTilePage.jsp!!! So I had to change jsp name in the parent template definition? Does it means, template file name in parent template and 'name' in child tile definition should be same as below example?
Please let me know if I am not clear.
<tiles-definitions>
<!-- Default Main Template -->
<definition name=".mainTemplate" template="/WEB-INF/jsp/
showTilePage.jsp">
<put-attribute name="title" value="Empty" type="string" cascade="true"/>
<put-attribute name="header" value="/WEB-INF/views/templates/header.jsp" />
<put-attribute name="footer" value="/WEB-INF/views/templates/footer.jsp" />
<put-attribute name="menu" value="/WEB-INF/views/templates/menu.jsp" />
<put-attribute name="body" value="/WEB-INF/views/templates/blank.jsp" />
</definition>
<definition name="
showTilePage" extends=".mainTemplate">
<put-attribute name="title" value="Spring TILES example" type="string" cascade="true" />
<put-attribute name="body" value="/WEB-INF/views/jsp/body.jsp" />
</definition>
</tiles-definitions>
Thanks.