title: The TLD for the class org.apache.tiles.jsp.taglib.InsertAttributeTag specifies an invalid body-content (JSP) for a SimpleTag
body: <p>I work with Java WEB-application: maven+spring_mvc+jsp+Apache-Tiles+eclipse+tomcat.</p>
  
  <p>Apllication good startup and work from Eclipse (tomcat plugin, from files),
  but when i build war-file and deploy him, i get errors:</p>
  
  <pre><code>*org.apache.jasper.JasperException: /WEB-INF/pages/layouts/layout.jsp (line: 23, column: 3) The TLD for the class org.apache.tiles.jsp.taglib.InsertAttributeTag specifies an invalid body-content (JSP) for a SimpleTag.
      org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
      org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408)
      org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:149)
      org.apache.jasper.compiler.Validator$ValidateVisitor.visit(Validator.java:820)
      org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1539)
      org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
      org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
      org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434)
      org.apache.jasper.compiler.Node$Root.accept(Node.java:475)
      org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
      org.apache.jasper.compiler.Validator.validateExDirectives(Validator.java:1795)
      org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:217)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
      org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
      org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
      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)
      org.apache.tiles.servlet.context.ServletTilesRequestContext.forward(ServletTilesRequestContext.java:241)
      org.apache.tiles.servlet.context.ServletTilesRequestContext.dispatch(ServletTilesRequestContext.java:222)
      org.apache.tiles.renderer.impl.TemplateAttributeRenderer.write(TemplateAttributeRenderer.java:44)
      org.apache.tiles.renderer.impl.AbstractBaseAttributeRenderer.render(AbstractBaseAttributeRenderer.java:106)
      org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:670)
      org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:690)
      org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:644)
      org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:627)
      org.apache.tiles.impl.BasicTilesContainer.render(BasicTilesContainer.java:321)
      org.springframework.web.servlet.view.tiles2.TilesView.renderMergedOutputModel(TilesView.java:124)
      org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:262)
      org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1180)
      org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:950)
      org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
      org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
      org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
      org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
      org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)*
  </code></pre>
  
  <p>my layouts.jsp:</p>
  
  <pre><code>&lt;!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt;
  
  &lt;%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles"%&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt;
  &lt;head&gt;
  
      &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
  
      &lt;link href="/unetProj/bootstrap/css/bootstrap.min.css" rel="stylesheet"
          media="screen"&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
      &lt;script src="/unetProj/bootstrap/js/bootstrap.min.js"&gt;&lt;/script&gt;
  
      &lt;div id="form_container"&gt;
          &lt;div id="header"&gt;
              &lt;tiles:insertAttribute name="header" /&gt;
          &lt;/div&gt;
  
          &lt;tiles:insertAttribute name="body" /&gt;
  
          &lt;div id="footer"&gt;
              &lt;tiles:insertAttribute name="footer" /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  
  &lt;/html&gt;
  </code></pre>
  
  <p>layouts.xml</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/pages/layouts/layout.jsp"&gt;
          &lt;put-attribute name="title" value="" /&gt;
          &lt;put-attribute name="header" value="/WEB-INF/pages/layouts/header.jsp" /&gt;
          &lt;put-attribute name="menu" value="/WEB-INF/pages/layouts/menu.jsp" /&gt;
          &lt;put-attribute name="body" value="" /&gt;
          &lt;put-attribute name="footer" value="/WEB-INF/pages/layouts/footer.jsp" /&gt;
    &lt;/definition&gt;
  
  &lt;/tiles-definitions&gt;
  </code></pre>
  
  <p>mvc-dispather-servlet.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans:beans xmlns="http://www.springframework.org/schema/mvc"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:beans="http://www.springframework.org/schema/beans"
      xmlns:p="http://www.springframework.org/schema/p"
      xmlns:context="http://www.springframework.org/schema/context"
      xmlns:security="http://www.springframework.org/schema/security"
      xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
          http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
          http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd"&gt;
  
      &lt;context:component-scan base-package="controller"&gt;
          &lt;context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/&gt;
      &lt;/context:component-scan&gt; 
  
  
       &lt;!-- Tiles Configuration --&gt;
      &lt;beans:bean class="org.springframework.web.servlet.view.UrlBasedViewResolver" id="tilesViewResolver"&gt;
          &lt;beans:property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView"/&gt;
      &lt;/beans:bean&gt;
  
      &lt;beans:bean class="org.springframework.web.servlet.view.tiles2.TilesConfigurer" id="tilesConfigurer"&gt;
          &lt;beans:property name="definitions"&gt;
              &lt;beans:list&gt;
                  &lt;beans:value&gt;/WEB-INF/pages/layouts/layouts.xml&lt;/beans:value&gt;
                  &lt;!-- Scan views directory for Tiles configurations --&gt;
                  &lt;beans:value&gt;/WEB-INF/pages/**/views.xml&lt;/beans:value&gt;
              &lt;/beans:list&gt;
          &lt;/beans:property&gt;
      &lt;/beans:bean&gt;
  
  &lt;/beans:beans&gt;
  </code></pre>
  
  <p>one views.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;!DOCTYPE tiles-definitions PUBLIC "-//Apache Software Foundation//DTD Tiles Configuration 2.1//EN" "http://tiles.apache.org/dtds/tiles-config_2_1.dtd"&gt;
  &lt;tiles-definitions&gt;
  
      &lt;definition extends="base.definition" name="entity/index"&gt;
          &lt;put-attribute name="body" value="/WEB-INF/pages/entity/index.jsp" /&gt;
      &lt;/definition&gt;
  
      &lt;definition extends="base.definition" name="entity/addForm"&gt;
          &lt;put-attribute name="body" value="/WEB-INF/pages/entity/addForm.jsp" /&gt;
      &lt;/definition&gt;
  
      &lt;definition extends="base.definition" name="entity/add"&gt;
          &lt;put-attribute name="body" value="/WEB-INF/pages/entity/add.jsp" /&gt;
      &lt;/definition&gt;
  
  &lt;/tiles-definitions&gt;
  </code></pre>