title: No mapping found for HTTP request with URI xxx in DispatcherServlet with name xx
body: <p>I looked up in almost every topic I found concerning that error but none of them was useful to me.</p>
  
  <p>I created a simple Spring MVC project, when I run the project I get this error :</p>
  
  <pre><code>févr. 19, 2016 12:29:56 PM org.springframework.web.servlet.PageNotFound noHandlerFound
  AVERTISSEMENT: No mapping found for HTTP request with URI [/SpringMVCsample1/] in DispatcherServlet with name 'one'
  </code></pre>
  
  <p>Here is my code :</p>
  
  <p>web.xml :</p>
  
  <pre><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;SpringMVCsample1&lt;/display-name&gt;
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.html&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.htm&lt;/welcome-file&gt;
      &lt;welcome-file&gt;default.jsp&lt;/welcome-file&gt;
      &lt;welcome-file&gt;jsp/hello.jsp&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
  
  
  
     &lt;display-name&gt;Spring MVC Application&lt;/display-name&gt;
  
     &lt;servlet&gt;
        &lt;servlet-name&gt;one&lt;/servlet-name&gt;
        &lt;servlet-class&gt;
           org.springframework.web.servlet.DispatcherServlet
        &lt;/servlet-class&gt;
        &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
     &lt;/servlet&gt;
  
     &lt;servlet-mapping&gt;
        &lt;servlet-name&gt;one&lt;/servlet-name&gt;
        &lt;url-pattern&gt;/&lt;/url-pattern&gt;
     &lt;/servlet-mapping&gt;
  
     &lt;/web-app&gt;
  </code></pre>
  
  <p>one-servlet.xml :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
     xmlns:context="http://www.springframework.org/schema/context"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="
     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"&gt;
  
      &lt;!-- This will allow Spring to load all the components from package com.capgemini.springtest   --&gt;
      &lt;!-- and all its child packages. --&gt;
     &lt;context:component-scan base-package="com.capgemini.springtest" /&gt;
  
     &lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
        &lt;property name="prefix" value="/WEB-INF/jsp/" /&gt;
        &lt;property name="suffix" value=".jsp" /&gt;
     &lt;/bean&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>OneController.java :</p>
  
  <pre><code>package com.capgemini.springtest;
  
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  import org.springframework.ui.ModelMap;
  
  
  @Controller
  public class OneController {
  
      @RequestMapping(value = "/hello", method = RequestMethod.GET)
      public String printHello(ModelMap model) {
  
          model.addAttribute("message", "Hello Spring MVC Framework!");
  
          return "hello";
      }
  
  }
  </code></pre>
  
  <p>hello.jsp :</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=ISO-8859-1"
      pageEncoding="ISO-8859-1"%&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=ISO-8859-1"&gt;
  &lt;title&gt;Insert title here&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
     &lt;h2&gt;${message}&lt;/h2&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Any ideas ?</p>