title: Something wrong with struts 2 tiles2.2.2 configuration. Can anyone help troubleshoot?
body: <p>Below are my resources.</p>
  
  <p>a) 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/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5"&gt;
    &lt;display-name&gt;ezviewocean&lt;/display-name&gt;
    &lt;description&gt;EZ-View Ocean&lt;/description&gt;
          &lt;context-param&gt;
              &lt;param-name&gt; org.apache.tiles.impl.BasicTilesContainer.DEFINITIONS_CONFIG&lt;/param-name&gt;
              &lt;param-value&gt;/WEB-INF/tiles.xml&lt;/param-value&gt;
          &lt;/context-param&gt;
      &lt;listener&gt;
          &lt;listener-class&gt;org.apache.struts2.tiles.StrutsTilesListener&lt;/listener-class&gt;
      &lt;/listener&gt;
      &lt;filter&gt;
          &lt;filter-name&gt;struts-prepare&lt;/filter-name&gt;
          &lt;filter-class&gt;org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter&lt;/filter-class&gt;
      &lt;/filter&gt;
      &lt;filter-mapping&gt;
          &lt;filter-name&gt;struts-prepare&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>b) 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="Template"/&gt;
        &lt;put-attribute name="header" value="/header.jsp"/&gt;
        &lt;put-attribute name="leftmenu"   value="/leftmenu.jsp"/&gt;
        &lt;put-attribute name="body"   value="/body.jsp"/&gt;
        &lt;put-attribute name="footer"   value="/footer.jsp"/&gt;
     &lt;/definition&gt;
  
     &lt;definition name="view" extends="baseLayout"&gt;
        &lt;put-attribute name="title"  value="View"/&gt;
        &lt;put-attribute name="body"   value="/viewBody.jsp"/&gt;      
     &lt;/definition&gt;
  
     &lt;definition name="assign" extends="baseLayout"&gt;
        &lt;put-attribute name="title"  value="Assign"/&gt;
        &lt;put-attribute name="body"   value="/assignBody.jsp"/&gt;      
     &lt;/definition&gt;
  
  &lt;/tiles-definitions&gt;
  </code></pre>
  
  <p>c) 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.3//EN"
      "http://struts.apache.org/dtds/struts-2.3.dtd"&gt;
  
  &lt;struts&gt;
      &lt;constant name="struts.enable.DynamicMethodInvocation" value="false" /&gt;
      &lt;constant name="struts.devMode" value="true"/&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" method="execute"
              class="com.schenker.ocean.actions.LoginAction"&gt;
              &lt;result name="success" type="tiles"&gt;baseLayout&lt;/result&gt;
              &lt;result name="input"&gt;/login.jsp&lt;/result&gt;
              &lt;result name="fail"&gt;/login.jsp&lt;/result&gt;
          &lt;/action&gt;
      &lt;/package&gt;
  &lt;/struts&gt;
  </code></pre>
  
  <p>I have 
  tiles-api-2.2.2.jar,
  tiles-core-2.2.2.jar,
  tiles-jsp-2.2.2.jar, 
  tiles-servlet-2.2.2.jar, 
  tiles-compact-2.2.2.jar, 
  struts2-tiles-plugin-2.2.16.3.jar</p>
  
  <p>and some other jars in my web-inf/lib folder.</p>
  
  <p>Also, below is the baseLayout.jsp </p>
  
  <pre class="lang-xml prettyprint-override"><code>&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;tiles:insertAttribute name="header" /&gt;&lt;br/&gt;
     &lt;hr/&gt;
     &lt;tiles:insertAttribute name="leftMenu" /&gt;&lt;br/&gt;
     &lt;hr/&gt;
     &lt;tiles:insertAttribute name="body" /&gt;&lt;br/&gt;
     &lt;hr/&gt;
     &lt;tiles:insertAttribute name="footer" /&gt;&lt;br/&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I can post other pages or screenshots if needed. Below is the error i get when i try to run this application.</p>
  
  <pre class="lang-xml prettyprint-override"><code>Struts has detected an unhandled exception:
  
  Messages:   
  org.apache.tiles.template.AttributeResolver
  org/apache/tiles/template/AttributeResolver
  java.lang.NoClassDefFoundError: org/apache/tiles/template/AttributeResolver
  File:   org/apache/catalina/loader/WebappClassLoader.java
  Line number:    1,680
  </code></pre>
  
  <p>Answer: in my case using the tilesServelet worked. Check the comments below.</p>