title: Tiles 3 view resolver issue with Spring 3.2 mvc
body: <p>I'm new to Tiles and Spring MVC. I've a problem with display (I looked through several similar issues but found no solution for 'my problem').
  Here is my 'tiles-servlet.xml' configuration (tried with <code>UrlBasedViewResolver</code> and <code>TilesViewResolver</code>). </p>
  
  <pre><code>....
  &lt;bean id="viewResolver" class="org.springframework.web.servlet.view.tiles3.TilesViewResolver"&gt;  
      &lt;property name="viewClass"&gt;  
          &lt;value&gt;org.springframework.web.servlet.view.tiles3.TilesView&lt;/value&gt;  
      &lt;/property&gt;  
  &lt;/bean&gt;
  
  &lt;bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles3.TilesConfigurer"&gt;  
      &lt;property name="definitions"&gt;
          &lt;list&gt;
              &lt;value&gt;/WEB-INF/tiles.xml&lt;/value&gt;
              &lt;value&gt;/WEB-INF/tiles-booking.xml&lt;/value&gt;
          &lt;/list&gt;  
      &lt;/property&gt;  
  &lt;/bean&gt; 
  ....
  </code></pre>
  
  <p>My 'tiles.xml' containing the Tiles definitions</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;  
  &lt;!DOCTYPE tiles-definitions PUBLIC  "-//Apache Software Foundation//DTD Tiles Configuration 3.0//EN"  "http://tiles.apache.org/dtds/tiles-config_3_0.dtd"&gt;
  &lt;tiles-definitions&gt;  
      &lt;definition name="base.definition" template="/WEB-INF/tiles/template/defaultLayout.jsp"&gt;  
          &lt;put-attribute name="title" value="" /&gt;  
          &lt;put-attribute name="header" value="/WEB-INF/tiles/template/defaultHeader.jsp" /&gt;  
          &lt;put-attribute name="search" value="/WEB-INF/search/searchCriteria.jsp" /&gt;  
          &lt;put-attribute name="searchResults" value="/WEB-INF/search/searchResults.jsp" /&gt;  
          &lt;put-attribute name="unitDetails" value="/WEB-INF/search/unitDetails.jsp" /&gt;  
          &lt;put-attribute name="footer" value="/WEB-INF/tiles/template/defaultFooter.jsp" /&gt;  
          &lt;put-attribute name="body" value="/WEB-INF/tiles/template/defaultContent.jsp" /&gt;  
      &lt;/definition&gt;
  
      &lt;definition name="indexPage" template="/WEB-INF/tiles/template/simpleLayout.jsp"&gt;
          &lt;put-attribute name="header" value="/WEB-INF/tiles/template/defaultHeader.jsp" /&gt;  
          &lt;put-attribute name="title" value="Welcome to Venue Bookings" /&gt;
          &lt;put-attribute name="indexPage" value="/WEB-INF/jsp/indexPage.jsp" /&gt;  
          &lt;put-attribute name="footer" value="/WEB-INF/tiles/template/defaultFooter.jsp" /&gt;  
      &lt;/definition&gt;
  
      &lt;definition name="searchForm" extends="base.definition"&gt;
          &lt;put-attribute name="title" value="Search form" /&gt;  
          &lt;put-attribute name="search" value="/WEB-INF/search/searchCriteria.jsp" /&gt;  
          &lt;put-attribute name="searchResults" value="/WEB-INF/search/searchResults.jsp" /&gt;  
          &lt;put-attribute name="unitDetails" value="/WEB-INF/search/unitDetails.jsp" /&gt;  
      &lt;/definition&gt;  
  
      &lt;definition name="bookConfirmationForm" extends="/WEB-INF/tiles/template/bookingLayout.jsp"&gt;
          &lt;put-attribute name="title" value="Booking Confirmation" /&gt;  
          &lt;put-attribute name="booking" value="/WEB-INF/search/configmBooking.jsp" /&gt;  
      &lt;/definition&gt;  
  
  &lt;/tiles-definitions&gt;
  </code></pre>
  
  <p>I have <em>all</em> the specified JSP files defined, working and are available. All those have been working for quiet some time, non issues. However, yesterday I defined to display a new page for booking. I'm facing error:</p>
  
  <ul>
  <li>When I comment the definition 'bookConfirmationForm' (as above),
  everything works fine. Strange, if I enable this definition, I face
  the issues with the home page itself ('indexPage' view is my start
  page).</li>
  <li>When I comment the above definition, things work fine until I
  reach the above view and obviously, it fails there.</li>
  </ul>
  
  <p>Here is the exception:</p>
  
  <pre><code>org.apache.jasper.JasperException: javax.servlet.ServletException: Could not resolve view with name 'indexPage' in servlet with name 'tiles'
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:585)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:455)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
  root cause: javax.servlet.ServletException: Could not resolve view with name 'indexPage' in servlet with name 'tiles'
      org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1190)
  </code></pre>
  
  <p>Finally, my controller methods:</p>
  
  <pre><code>@RequestMapping(value = "/index")
  public ModelAndView indexPage() {
      Map&lt;String, Object&gt; model = new HashMap&lt;String, Object&gt;();
      ....
      model.put("command", new SearchCriteriaBean());
      return new ModelAndView("indexPage", model);
  }
  
  @RequestMapping(value = "/checkAvailability", method = RequestMethod.GET)
  public ModelAndView checkAvailability(@ModelAttribute("agreedBookingRequest") 
      UnitBookingAgreementBean agreedBookingRequest, HttpSession session) {
      .....
          return new ModelAndView("bookConfirmationForm", model);
  }
  </code></pre>
  
  <p>I think that the mistake must be a stupid one, but I'm unable to figure it out. I tried with tiles2 as well, but that didn't help.</p>