title: WARNING: No mapping found for HTTP request with URI
body: <p>When I'm trying to run my spring web application I am getting the following error:</p>
  
  <pre><code>org.springframework.web.servlet.DispatcherServlet noHandlerFound
  WARNING: No mapping found for HTTP request with URI [/HibwenateWeb/index] in DispatcherServlet with name 'customerdispatcher
  </code></pre>
  
  <p>I am not able to load my home page. I gone through many articles releavent to the error, mostly every one is suggested to add <code>&lt;mvc:default-servlet-handler /&gt;</code> in  dispatcher after adding that I am not getting that nohandler error but still the home page is not loading. I coudn't figure out the issue..Can any one help me on this?</p>
  
  <p>My controller</p>
  
  <pre><code>package com.springforbeginners.controller;
  
  import java.util.Map;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.ui.ModelMap;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  import org.springframework.web.servlet.ModelAndView;
  
  @Controller
  public class CustomerController {
      @RequestMapping(value="/index")
      public String listCustomers(ModelAndView mav) {
          System.out.println("Hi i am in controller");
          //map.put("customer", new Customer());
          //map.put("customerList", customerService.listCustomer());
          mav.setViewName("customer");
          return "customer";
      }
  
  }
  </code></pre>
  
  <p>customerdispatcher-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:aop="http://www.springframework.org/schema/aop" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:tx="http://www.springframework.org/schema/tx" xmlns:mvc="http://www.springframework.org/schema/mvc"
      xsi:schemaLocation="http://www.springframework.org/schema/beans  
  
          http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
          http://www.springframework.org/schema/aop 
          http://www.springframework.org/schema/aop/spring-aop-3.1.xsd
          http://www.springframework.org/schema/context 
          http://www.springframework.org/schema/context/spring-context-3.1.xsd 
          http://www.springframework.org/schema/tx 
          http://www.springframework.org/schema/tx/spring-tx-3.1.xsd
           http://www.springframework.org/schema/mvc
          http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd"&gt;
      &lt;mvc:annotation-driven /&gt;
      &lt;context:annotation-config /&gt;
      &lt;context:component-scan base-package="com.springforbeginners" /&gt;
  
      &lt;bean id="viewResolver"
          class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;property name="viewClass"
              value="org.springframework.web.servlet.view.JstlView" /&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>web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app version="3.0" 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_3_0.xsd"&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;customerdispatcher&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;customerdispatcher&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/index&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
      &lt;session-config&gt;
          &lt;session-timeout&gt;30&lt;/session-timeout&gt;
      &lt;/session-config&gt;
  
  &lt;/web-app&gt;
  </code></pre>