title: Apache Tiles CannotRenderExcption
body: <p>I am trying to add Tiles to my web application however I am getting a CannotRenderException when I run my application</p>
  
  <blockquote>
    <p>Request processing failed; nested exception is
    org.apache.tiles.request.render.CannotRenderException:
    ServletException including path
    '/WEB-INF/tiles/templates/baseLayout.jsp'.</p>
  </blockquote>
  
  <p>Here is the actual exception :</p>
  
  <pre><code>org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.tiles.request.render.CannotRenderException: ServletException including path '/WEB-INF/tiles/templates/baseLayout.jsp'.
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:973)
      org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:852)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:624)
      org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
      org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)
      org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)
      org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:183)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
      org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)
      org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)
      org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)
      org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
      org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
  </code></pre>
  
  <p>My tile-definition.xml</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="baseLayout" template="/WEB-INF/tiles/templates/baseLayout.jsp"&gt;
          &lt;put-attribute name="title" value="Sample Title" /&gt;
          &lt;put-attribute name="heading" value="" /&gt;
          &lt;put-attribute name="tagline" value="" /&gt;
          &lt;put-attribute name="navigation" value="/WEB-INF/tiles/templates/navigation.jsp" /&gt;
          &lt;put-attribute name="content" value="" /&gt;
          &lt;put-attribute name="footer" value="/WEB-INF/tiles/templates/footer.jsp" /&gt;
      &lt;/definition&gt;
  
      &lt;definition name="home" extends="baseLayout"&gt;
          &lt;put-attribute name="title" value="Products" /&gt;
          &lt;put-attribute name="heading" value="Products" /&gt;
          &lt;put-attribute name="tagline" value="Available Products" /&gt;
          &lt;put-attribute name="content" value="/WEB-INF/views/products.jsp" /&gt;
      &lt;/definition&gt;
  
      &lt;definition name="products" extends="baseLayout"&gt;
          &lt;put-attribute name="title" value="Products" /&gt;
          &lt;put-attribute name="heading" value="Products" /&gt;
          &lt;put-attribute name="tagline" value="Available Products" /&gt;
          &lt;put-attribute name="content" value="/WEB-INF/views/products.jsp" /&gt;
      &lt;/definition&gt;
  
      &lt;definition name="product" extends="baseLayout"&gt;
          &lt;put-attribute name="title" value="Product" /&gt;
          &lt;put-attribute name="heading" value="Products" /&gt;
          &lt;put-attribute name="tagline" value="Product" /&gt;
          &lt;put-attribute name="content" value="/WEB-INF/views/product.jsp" /&gt;
      &lt;/definition&gt;
  
      &lt;definition name="addProduct" extends="baseLayout"&gt;
          &lt;put-attribute name="title" value="Products" /&gt;
          &lt;put-attribute name="heading" value="Products" /&gt;
          &lt;put-attribute name="tagline" value="Product" /&gt;
          &lt;put-attribute name="content" value="/WEB-INF/views/addProduct.jsp" /&gt;
      &lt;/definition&gt;
  
      &lt;definition name="login" extends="baseLayout"&gt;
          &lt;put-attribute name="title" value="Login" /&gt;
          &lt;put-attribute name="heading" value="Login" /&gt;
          &lt;put-attribute name="tagline" value="Enter your Credentials" /&gt;
          &lt;put-attribute name="content" value="/WEB-INF/views/login.jsp" /&gt;
      &lt;/definition&gt;
  
      &lt;definition name="cart" extends="baseLayout"&gt;
          &lt;put-attribute name="title" value="Shpping Cart" /&gt;
          &lt;put-attribute name="heading" value="Cart" /&gt;
          &lt;put-attribute name="tagline" value="your shopping cart" /&gt;
          &lt;put-attribute name="content" value="/WEB-INF/views/cart.jsp" /&gt;
      &lt;/definition&gt;
  
      &lt;definition name="collectCustomerInfo" extends="baseLayout"&gt;
          &lt;put-attribute name="title" value="Customer Details" /&gt;
          &lt;put-attribute name="heading" value="Customer Details" /&gt;
          &lt;put-attribute name="content" value="/WEB-INF/flows/checkout/collectCustomerInfo.jsp" /&gt;
      &lt;/definition&gt;
  
      &lt;definition name="collectShippingDetail" extends="baseLayout"&gt;
          &lt;put-attribute name="title" value="Shipping Details" /&gt;
          &lt;put-attribute name="heading" value="Shipping Details" /&gt;
          &lt;put-attribute name="content" value="/WEB-INF/flows/checkout/collectShippingDetail.jsp" /&gt;
      &lt;/definition&gt;
  
      &lt;definition name="orderConfirmation" extends="baseLayout"&gt;
          &lt;put-attribute name="title" value="Order Confirmation" /&gt;
          &lt;put-attribute name="heading" value="Order Confirmation" /&gt;
          &lt;put-attribute name="content" value="/WEB-INF/flows/checkout/orderConfirmation.jsp" /&gt;
      &lt;/definition&gt;
  
      &lt;definition name="InvalidCartWarning" extends="baseLayout"&gt;
          &lt;put-attribute name="title" value="Invalid Cart" /&gt;
          &lt;put-attribute name="heading" value="Invalid Cart" /&gt;
          &lt;put-attribute name="content" value="/WEB-INF/flows/checkout/InvalidCartWarning.jsp" /&gt;
      &lt;/definition&gt;
  
      &lt;definition name="thankCustomer" extends="baseLayout"&gt;
          &lt;put-attribute name="title" value="Thank you" /&gt;
          &lt;put-attribute name="heading" value="Thank you" /&gt;
          &lt;put-attribute name="content" value="/WEB-INF/flows/checkout/thankCustomer.jsp" /&gt;
      &lt;/definition&gt;
  
  &lt;/tiles-definitions&gt;
  </code></pre>
  
  <p>My baseLayout.jsp</p>
  
  <pre><code>&lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%&gt;
  &lt;%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%&gt;
  &lt;%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%&gt;
  
  
  &lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
  &lt;meta charset="utf-8"&gt;
  &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
  &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
  
  &lt;title&gt;&lt;tiles:insertAttribute name="title" /&gt;&lt;/title&gt;
  
          &lt;link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css"&gt;
  
  &lt;link href="http://getbootstrap.com/examples/jumbotron/jumbotron.css"   rel="stylesheet"&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
      &lt;div class="container"&gt;
          &lt;div class="header"&gt;
              &lt;ul class="nav nav-pills pull-right"&gt;
                  &lt;tiles:insertAttribute name="navigation" /&gt;
              &lt;/ul&gt;
              &lt;h3 class="text-muted"&gt;Trading Cards&lt;/h3&gt;
          &lt;/div&gt;
  
          &lt;div class="jumbotron"&gt;
              &lt;h1&gt;
                  &lt;tiles:insertAttribute name="heading" /&gt;
              &lt;/h1&gt;
              &lt;p&gt;
                  &lt;tiles:insertAttribute name="tagline" /&gt;
              &lt;/p&gt;
          &lt;/div&gt;
  
          &lt;div class="row"&gt;
              &lt;tiles:insertAttribute name="content" /&gt;
          &lt;/div&gt;
  
          &lt;div class="footer"&gt;
              &lt;tiles:insertAttribute name="footer" /&gt;
          &lt;/div&gt;
  
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Also I will just point out that all <code>&lt;tiles:insertAtrribute name="..." /&gt;</code> tags are giving me a warning. Any help or advice with this will be greatly appreciated</p>