title: org.apache.tiles.template.NoSuchAttributeException: Attribute 'header' not found
body: <p>i search every post on this question but didn't get an answer.please help me to solve this problem quickly.</p>
  
  <p>i used spring 3.1.1 and tile2.2.2.but running the project i got an error like follows :</p>
  
  <pre><code>org.apache.tiles.template.NoSuchAttributeException: Attribute 'header' not found.
      at org.apache.tiles.template.DefaultAttributeResolver.computeAttribute(DefaultAttributeResolver.java:49)
      at org.apache.tiles.template.InsertAttributeModel.resolveAttribute(InsertAttributeModel.java:187)
      at org.apache.tiles.template.InsertAttributeModel.start(InsertAttributeModel.java:107)
      at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:306)
      at org.apache.jsp.WEB_002dINF.jsp.main_jsp._jspx_meth_tiles_005finsertAttribute_005f1(main_jsp.java:134)
      at org.apache.jsp.WEB_002dINF.jsp.main_jsp._jspService(main_jsp.java:75)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
      at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
      at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)
      at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1180)
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950)
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
      at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java.lang.Thread.run(Thread.java:619)
  Jun 11, 2015 10:37:19 AM org.apache.catalina.core.StandardWrapperValve invoke
  SEVERE: Servlet.service() for servlet [spring] in context with path [/Spring3HibernateMaven] threw exception [org.apache.tiles.template.NoSuchAttributeException: Attribute 'header' not found.] with root cause
  org.apache.tiles.template.NoSuchAttributeException: Attribute 'header' not found.
      at org.apache.tiles.template.DefaultAttributeResolver.computeAttribute(DefaultAttributeResolver.java:49)
      at org.apache.tiles.template.InsertAttributeModel.resolveAttribute(InsertAttributeModel.java:187)
      at org.apache.tiles.template.InsertAttributeModel.start(InsertAttributeModel.java:107)
      at org.apache.tiles.jsp.taglib.InsertAttributeTag.doTag(InsertAttributeTag.java:306)
      at org.apache.jsp.WEB_002dINF.jsp.main_jsp._jspx_meth_tiles_005finsertAttribute_005f1(main_jsp.java:134)
      at org.apache.jsp.WEB_002dINF.jsp.main_jsp._jspService(main_jsp.java:75)
      at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
      at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
      at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:749)
      at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:487)
      at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:412)
      at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:339)
      at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:238)
      at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)
      at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1180)
      at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950)
      at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
      at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
      at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:936)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1004)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
      at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java.lang.Thread.run(Thread.java:619)
  </code></pre>
  
  <p>tile.xml as follows :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE tiles-definitions PUBLIC  
         "-//Apache Software Foundation//DTD Tiles Configuration 2.0//EN"  
         "http://tiles.apache.org/dtds/tiles-config_2_0.dtd"&gt;  
  &lt;tiles-definitions&gt;  
      &lt;definition name="base.definition"  
          template="/WEB-INF/jsp/main.jsp"&gt;  
          &lt;put-attribute name="title" value="" /&gt;  
          &lt;put-attribute name="header" value="/WEB-INF/jsp/header.jsp" /&gt;  
          &lt;put-attribute name="menu" value="/WEB-INF/jsp/menu.jsp" /&gt;  
          &lt;put-attribute name="body" value="" /&gt;  
          &lt;put-attribute name="footer" value="/WEB-INF/jsp/footer.jsp" /&gt;  
      &lt;/definition&gt;  
  
      &lt;definition name="userRedirect" extends="base.definition"&gt;
  
          &lt;put-attribute name="title" value="User Management" /&gt;          
          &lt;put-attribute name="body" value="/WEB-INF/jsp/UserManagement.jsp" /&gt;   
  
      &lt;/definition&gt;  
  
      &lt;definition name="usertype" extends="base.definition"&gt; 
  
          &lt;put-attribute name="title" value="User Type Management" /&gt;         
          &lt;put-attribute name="body" value="/WEB-INF/jsp/UserTypeManagement.jsp" /&gt;   
  
  
      &lt;/definition&gt;  
  
  &lt;/tiles-definitions&gt;  
  </code></pre>
  
  <p>main.jsp</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&gt;
      &lt;%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%&gt;
  &lt;!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"&gt;
  &lt;html&gt;  
  &lt;head&gt;  
  &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;  
  &lt;title&gt;&lt;tiles:insertAttribute name="title" ignore="true" /&gt;&lt;/title&gt;  
  &lt;/head&gt;  
  &lt;body&gt;  
          &lt;div&gt;&lt;tiles:insertAttribute name="header" /&gt;&lt;/div&gt;  
          &lt;div style="float:left;padding:10px;width:15%;"&gt;&lt;tiles:insertAttribute name="menu" /&gt;&lt;/div&gt;  
          &lt;div style="float:left;padding:10px;width:80%;border-left:1px solid pink;"&gt;  
          &lt;tiles:insertAttribute name="body" /&gt;&lt;/div&gt;  
          &lt;div style="clear:both"&gt;&lt;tiles:insertAttribute name="footer" /&gt;&lt;/div&gt;  
  
  &lt;/body&gt;  
  &lt;/html&gt;
  </code></pre>
  
  <p>spring-servlet.xml</p>
  
  <pre><code>&lt;bean id="jspViewResolver"
          class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;property name="viewClass"
              value="org.springframework.web.servlet.view.JstlView" /&gt;
          &lt;property name="prefix" value="/WEB-INF/jsp/" /&gt;
          &lt;property name="suffix" value=".jsp" /&gt;
      &lt;/bean&gt;
  &lt;bean id="viewResolver"  
          class="org.springframework.web.servlet.view.UrlBasedViewResolver"&gt;  
          &lt;property name="viewClass"&gt;  
              &lt;value&gt;  
                  org.springframework.web.servlet.view.tiles2.TilesView  
              &lt;/value&gt;  
          &lt;/property&gt;  
      &lt;/bean&gt;  
      &lt;bean id="tilesConfigurer"  
          class="org.springframework.web.servlet.view.tiles2.TilesConfigurer"&gt;  
          &lt;property name="definitions"&gt;  
              &lt;list&gt;  
                  &lt;value&gt;/WEB-INF/tiles.xml&lt;/value&gt;  
              &lt;/list&gt;  
          &lt;/property&gt;  
      &lt;/bean&gt; 
  </code></pre>