title: Apache Tiles issue - org.apache.tiles.jsp.taglib.InsertAttributeTag cannot be cast to javax.servlet.jsp.tagext.Tag
body: <p>I tried to use tiles 2.2.2 with Struts 2. I included all the necessary jars(related to tiles, Struts2 and Struts2 tiles plugin) in the project.</p>
  
  <pre><code>commons-beanutils-1.8.0.jar
  commons-collections-3.1.jar
  commons-digester-2.0.jar
  commons-fileupload-1.3.jar
  commons-io-2.0.1.jar
  commons-lang-2.4.jar
  commons-lang3-3.1.jar
  commons-logging-1.1.3.jar
  freemarker-2.3.19.jar
  javassist-3.11.0.GA.jar
  ognl-3.0.6.jar
  slf4j-api-1.5.8.jar
  slf4j-jdk14-1.5.8.jar
  struts2-core-2.3.15.jar
  struts2-tiles-plugin-2.3.15.jar
  tiles-api-2.2.2.jar
  tiles-compat-2.2.2.jar
  tiles-core-2.2.2.jar
  tiles-jsp-2.2.2.jar
  tiles-servlet-2.2.2.jar
  tiles-template-2.2.2.jar
  xwork-core-2.3.15.jar
  </code></pre>
  
  <p>Tiles.xml  </p>
  
  <pre class="lang-xml prettyprint-override"><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="baseLayout" template="/BaseLayout.jsp"&gt;
      &lt;put-attribute name="title" value="" /&gt;
      &lt;put-attribute name="header" value="/Header.jsp" /&gt;
      &lt;put-attribute name="menu" value="/Menu.jsp" /&gt;
      &lt;put-attribute name="body" value="" /&gt;
      &lt;put-attribute name="footer" value="/Footer.jsp" /&gt;
  &lt;/definition&gt;
  
  &lt;definition name="/welcome.tiles" extends="baseLayout"&gt;
      &lt;put-attribute name="title" value="Welcome" /&gt;
      &lt;put-attribute name="body" value="/Welcome.jsp" /&gt;
  &lt;/definition&gt;
  
  &lt;definition name="/employee.tiles" extends="baseLayout"&gt;
      &lt;put-attribute name="title" value="Employee Form" /&gt;
      &lt;put-attribute name="body" value="/Employee.jsp" /&gt;
  &lt;/definition&gt;
  &lt;definition name="/employee.success.tiles" extends="baseLayout"&gt;
      &lt;put-attribute name="title" value="Employee Added" /&gt;
      &lt;put-attribute name="body" value="/SuccessEmployee.jsp" /&gt;
  &lt;/definition&gt;
  
  &lt;/tiles-definitions&gt;
  </code></pre>
  
  <p>Web.xml</p>
  
  <pre class="lang-xml prettyprint-override"><code>    &lt;?xml version="1.0" encoding="UTF-8"?&gt;
      &lt;web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:javaee="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" id="WebApp_9" version="2.4"&gt;
    &lt;javaee:display-name&gt;Apache Tiles framework&lt;/javaee:display-name&gt;
    &lt;listener&gt;
      &lt;listener-class&gt;
              org.apache.struts2.tiles.StrutsTilesListener
          &lt;/listener-class&gt;
    &lt;/listener&gt;
    &lt;context-param&gt;
      &lt;param-name&gt;tilesDefinitions&lt;/param-name&gt;
      &lt;param-value&gt;/WEB-INF/tiles.xml&lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;filter&gt;
      &lt;filter-name&gt;struts2&lt;/filter-name&gt;
      &lt;filter-class&gt;
              org.apache.struts2.dispatcher.FilterDispatcher
          &lt;/filter-class&gt;
    &lt;/filter&gt;
    &lt;filter-mapping&gt;
      &lt;filter-name&gt;struts2&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
    &lt;/filter-mapping&gt;
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;Login.jsp&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>Struts.xml</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
  &lt;!DOCTYPE struts PUBLIC
      "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
      "http://struts.apache.org/dtds/struts-2.0.dtd"&gt;
  
  &lt;struts&gt;
      &lt;constant name="struts.enable.DynamicMethodInvocation"
          value="false" /&gt;
      &lt;constant name="struts.devMode" value="false" /&gt;
      &lt;constant name="struts.custom.i18n.resources"
          value="ApplicationResources" /&gt;
  
      &lt;package name="default" extends="struts-default" namespace="/"&gt;
          &lt;result-types&gt;
              &lt;result-type name="tiles"
                  class="org.apache.struts2.views.tiles.TilesResult" /&gt;
          &lt;/result-types&gt;
          &lt;action name="login" 
              class="com.teg.tiles.LoginAction"&gt;
              &lt;result name="success" type="tiles"&gt;/welcome.tiles&lt;/result&gt;
              &lt;result name="error"&gt;Login.jsp&lt;/result&gt;
          &lt;/action&gt;
          &lt;action name="employee" 
              class="com.teg.tiles.EmployeeAction"&gt;
              &lt;result name="success" type="tiles"&gt;/employee.success.tiles&lt;/result&gt;
              &lt;result name="input" type="tiles"&gt;/employee.tiles&lt;/result&gt;
          &lt;/action&gt;
          &lt;action name="employee-form"&gt;
              &lt;result name="success" type="tiles"&gt;/employee.tiles&lt;/result&gt;
          &lt;/action&gt;
      &lt;/package&gt;
  &lt;/struts&gt;
  </code></pre>
  
  <p>When I try to run the project I got following exception.</p>
  
  <blockquote>
    <p>java.lang.ClassCastException: org.apache.tiles.jsp.taglib.InsertAttributeTag cannot be cast to javax.servlet.jsp.tagext.Tag</p>
  </blockquote>
  
  <p>Please help me out to resolve the issue.</p>