title: No mapping found for HTTP request with URI Spring MVC
body: <p>Here's my Web.xml</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;servlet&gt;
      &lt;servlet-name&gt;dispatcherServlet&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/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;dispatcherServlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  
  &lt;listener&gt;
      &lt;listener-class&gt;
          org.springframework.web.context.ContextLoaderListener
      &lt;/listener-class&gt;
  &lt;/listener&gt;
  </code></pre>
  
  <p>my servlet-context.xml</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;context:component-scan base-package="com.springexample.controller.impl" /&gt;
      &lt;mvc:annotation-driven /&gt;
  
      &lt;bean
          class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;property name="prefix"&gt;
              &lt;value&gt;/WEB-INF/views/&lt;/value&gt;
          &lt;/property&gt;
          &lt;property name="suffix"&gt;
              &lt;value&gt;.jsp&lt;/value&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>And lastly the Handler class. which is under com.springexample.controller.impl</p>
  
  <pre><code>@Controller
  public class IndexControllerImpl implements IndexController {
  
      @RequestMapping("/")
      public String index() {
  
          return "index";
      }
  }
  </code></pre>
  
  <p>However on going to <code>localhost:8080/projectname/</code> </p>
  
  <p>it returns a 404 error.</p>
  
  <pre><code>Jul 27, 2013 8:18:31 PM org.springframework.web.servlet.DispatcherServlet noHandlerFound
  WARNING: No mapping found for HTTP request with URI [/tasklist/WEB-INF/views/index.jsp] in DispatcherServlet with name 'dispatcherServlet'
  Jul 27, 2013 8:18:37 PM org.springframework.web.servlet.DispatcherServlet noHandlerFound
  WARNING: No mapping found for HTTP request with URI [/tasklist/index] in DispatcherServlet with name '
  </code></pre>
  
  <p>Here is my project structure</p>
  
  <p><img src="https://i.stack.imgur.com/7jyGA.png" alt="Project Structure"></p>