title: No mapping found for HTTP request with URI [/myappname/] in DispatcherServlet with name 'appServlet'
body: <p>I have got error <code>No mapping found for HTTP request with URI [/myappname/] in DispatcherServlet with name 'appServlet'</code> when I was starting my project on JBoss. This is issue has occurred after resolving another issue described here: <a href="https://stackoverflow.com/q/12299322/845220">&quot;No Session found for current thread&quot; after changing access method to the session</a></p>
  
  <p>Before everything was working fine. I am using Apache Tiles 2. I am reading few similar questions but I can't find working solution.</p>
  
  <p>This is my <code>DispatcherServlet Context</code> file without Hibernate configuration:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans:beans xmlns="http://www.springframework.org/schema/mvc"
           xmlns:tx="http://www.springframework.org/schema/tx"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:beans="http://www.springframework.org/schema/beans"
           xmlns:context="http://www.springframework.org/schema/context"
           xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd
                      http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                      http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
                      http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd"&gt;
  
  &lt;!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure --&gt;
  
  &lt;!-- Enables the Spring MVC @Controller programming model --&gt;
  &lt;tx:annotation-driven /&gt;
  &lt;context:annotation-config /&gt;
  &lt;context:component-scan base-package="finances.webapp" /&gt;
  
  &lt;!-- Handles HTTP GET requests for resources by efficiently serving up static resources in the ${webappRoot}/resources directory --&gt;
  &lt;resources mapping="/resources/**" location="/resources/" /&gt;
  
  &lt;beans:bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles2.TilesConfigurer"&gt;
      &lt;beans:property name="definitions"&gt;
          &lt;beans:list&gt;
              &lt;beans:value&gt;/WEB-INF/tiles-definitions.xml&lt;/beans:value&gt;
          &lt;/beans:list&gt;
      &lt;/beans:property&gt;
  &lt;/beans:bean&gt;
  
  &lt;beans:bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver"&gt;
      &lt;beans:property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView" /&gt;
  &lt;/beans:bean&gt;
  </code></pre>
  
  <p>My <code>web.xml</code> whole file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&gt;
  
  &lt;!-- The definition of the Root Spring Container shared by all Servlets and Filters --&gt;
  &lt;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;
          /WEB-INF/spring/root-context.xml
      &lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;!-- Creates the Spring Container shared by all Servlets and Filters --&gt;
  &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  
  &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.security.web.session.HttpSessionEventPublisher&lt;/listener-class&gt;
  &lt;/listener&gt;
  
  &lt;!-- Processes application requests --&gt;
  &lt;servlet&gt;
      &lt;servlet-name&gt;appServlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;/WEB-INF/spring/appServlet/servlet-context.xml&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;appServlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>And this is my <code>IndexController</code>:</p>
  
  <pre><code>@Controller
  public class IndexController {
  
      @RequestMapping(value = "/", method = RequestMethod.GET)
      public String index(Model model, Principal principal) {
          return "index";
      }
  }
  </code></pre>
  
  <p>What is wrong with my configuration at this moment?</p>