title: org.springframework.web.servlet.PageNotFound noHandlerFound; WARNING: No mapping found for HTTP request with URI in DispatcherServlet
body: <p>I went through many forums and blogs to get the answer but couldn't get any useful tip or advice. So please if anybody can help in below issue it would be a great help.</p>
  
  <p>I am getting the below Warning and error when tried to connect to <code>http://localhost:8080/SpringApp/hello</code> :</p>
  
  <pre><code>INFO: Server startup in 6935 ms
  Jul 19, 2014 11:15:42 AM org.springframework.web.servlet.PageNotFound noHandlerFound
  WARNING: No mapping found for HTTP request with URI [/SpringApp/] in DispatcherServlet with name 'HelloWeb'
  Jul 19, 2014 11:16:29 AM com.example.java.HelloController printHelloWorld
  INFO: HelloController : printHelloWorld : ENTER
  Jul 19, 2014 11:16:29 AM com.example.java.HelloController printHelloWorld
  INFO: HelloController : printHelloWorld : EXIT
  Jul 19, 2014 11:16:29 AM org.springframework.web.servlet.PageNotFound noHandlerFound
  WARNING: No mapping found for HTTP request with URI [/SpringApp/WEB-INF/jsp/hello.jsp] in DispatcherServlet with name 'HelloWeb'
  </code></pre>
  
  <p>because of this I am getting HTTP Status 404 error in Tomcat.</p>
  
  <p>The whole data is provided below:</p>
  
  <p>The web.xml file is :</p>
  
  <pre><code>&lt;display-name&gt;Spring MVC Application&lt;/display-name&gt;
  &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
  &lt;/welcome-file-list&gt;
  
  &lt;servlet&gt;
      &lt;servlet-name&gt;HelloWeb&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/HelloWeb-servlet.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;HelloWeb&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>The HelloWeb-Servlet.xml file is : </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns:mvc="http://www.springframework.org/schema/mvc" 
  xmlns:p="http://www.springframework.org/schema/p"
  xmlns:context="http://www.springframework.org/schema/context"
  xsi:schemaLocation="http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
  http://www.springframework.org/schema/context
  http://www.springframework.org/schema/context/spring-context-3.2.xsd 
  http://www.springframework.org/schema/mvc
  http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd"&gt;
  &lt;context:component-scan base-package="com.example.java"&gt;&lt;/context:component-scan&gt;
  &lt;bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
      &lt;property name="prefix" value="/WEB-INF/jsp/"&gt;&lt;/property&gt;
      &lt;property name="suffix" value=".jsp"&gt;&lt;/property&gt;
  &lt;/bean&gt;
  &lt;context:annotation-config/&gt;
  &lt;mvc:annotation-driven/&gt;
  &lt;bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"&gt;&lt;/bean&gt;
  &lt;bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"&gt;&lt;/bean&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>The HelloController.java file is :</p>
  
  <pre><code>package com.example.java;
  
  import org.apache.commons.logging.Log;
  import org.apache.commons.logging.LogFactory;
  import org.springframework.stereotype.Controller;
  import org.springframework.ui.ModelMap;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  
  @Controller
  @RequestMapping("/hello")
  public class HelloController {
  
      protected final Log logger = LogFactory.getLog(getClass());
  
      @RequestMapping(method=RequestMethod.GET)
      public String printHelloWorld(ModelMap model){
          logger.info("HelloController : printHelloWorld : ENTER");
          model.addAttribute("message", "Hello Sumit");
          logger.info("HelloController : printHelloWorld : EXIT");
          return "hello";
      }
  }
  </code></pre>