title: There is no Action mapped for namespace [/] and action name [viewBooks] associated with context path [/SampleTC_test]. - [unknown location]
body: <p>I know that there are several other threads with the same error, but trust me, non of them helped me in solving my issue.</p>
  
  <p>I have a web application built on Java using Struts2 version struts-2.3.16 and Hibernate.</p>
  
  <p>My issue is, in my application I have struts.xml, because of it's huge size i split it into three xml files. One is main struts.xml which contains two include tag which points out to two different strtus-XXX.xml file's of the same application. My problem is that only one struts-XXX.xml is working and what ever the actions I write in the 2nd xml file are not working. If my application is trying to point out any "action" which was mentioned in the 2nd xml file it is not getting recognized.</p>
  
  <p>Here is my </p>
  
  <p>struts.xml code</p>
  
  <pre><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="true" /&gt;
      &lt;constant name="struts.custom.i18n.resources"
          value="ApplicationResources" /&gt;
  
  
      &lt;include file="struts/struts-codeGroup.xml"/&gt;
      &lt;include file="struts/struts-book.xml"/&gt;
  &lt;/struts&gt;
  </code></pre>
  
  <p>struts-codeGroup.xml</p>
  
  <pre><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.convention.result.path" value="/WEB-INF/"/&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" namespace="/" extends="struts-default"&gt;
  
      &lt;action name="viewCodeValues"   class="com.hibernate.action.CodeValuesAction"&gt;
              &lt;result name="success"&gt;/ViewCodeValues.jsp&lt;/result&gt;
          &lt;/action&gt;
  
      &lt;/package&gt;
  &lt;/struts&gt;
  </code></pre>
  
  <p>struts-book.xml</p>
  
  <pre><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.convention.result.path" value="/WEB-INF/"/&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" namespace="/" extends="struts-default"&gt;
  
  
          &lt;action name="viewBooks" class="com.hibernate.action.BookAction" method="viewBooks"&gt;
              &lt;result name="success"&gt;/viewBooks.jsp&lt;/result&gt;
          &lt;/action&gt;    
      &lt;/package&gt;
  &lt;/struts&gt;
  </code></pre>
  
  <p>Include tag with struts-codeGroup.xml is working fine but actions in struts-book.xml are not working at all and are giving me the error </p>
  
  <blockquote>
    <p>There is no Action mapped for namespace [<code>/</code>] and action name [<code>viewBooks</code>] associated with context path [<code>/SampleTC_test</code>]. - [unknown location]</p>
  </blockquote>