title: Getting org.springframework.web.servlet.PageNotFound noHandlerFound error
body: <p>I'm getting the 404 error with my first spring mvc application, followed all the configurations but no luck. Can you please help to figure out the problem.</p>
  
  <pre><code>    Following is the change:
  </code></pre>
  
  <p><strong>web.xml</strong></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" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"&gt;
    &lt;display-name&gt;HereWeGo&lt;/display-name&gt;
  
  
      &lt;display-name&gt;HereWeGo&lt;/display-name&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;spring-dispatcher&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;spring-dispatcher&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p><strong>spring-dispatcher-servlet.xml</strong></p>
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xmlns:context="http://www.springframework.org/schema/context"
      xmlns:mvc="http://www.springframework.org/schema/mvc"
      xmlns:tx="http://www.springframework.org/schema/tx" 
      xsi:schemaLocation="
       http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
       http://www.springframework.org/schema/context
       http://www.springframework.org/schema/context/spring-context-4.1.xsd
       http://www.springframework.org/schema/mvc 
       http://www.springframework.org/schema/mvc/spring-mvc-4.1.xsd
       http://www.springframework.org/schema/tx
       http://www.springframework.org/schema/tx/spring-tx-4.1.xsd"&gt;
  
      &lt;mvc:annotation-driven /&gt;
  
      &lt;bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
              &lt;property name="prefix"&gt;
                  &lt;value&gt;/WEB-INF/&lt;/value&gt;
              &lt;/property&gt;
              &lt;property name="suffix"&gt;
                  &lt;value&gt;.jsp&lt;/value&gt;
              &lt;/property&gt;
      &lt;/bean&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p><strong>HeyThere.java</strong></p>
  
  <pre><code>package com.aditya.spring;
  
  import org.springframework.stereotype.Controller;
  
  import org.springframework.web.bind.annotation.RequestMapping;
  
  import org.springframework.web.servlet.ModelAndView;
  
  import org.springframework.web.servlet.config.annotation.EnableWebMvc;
  
  
  @EnableWebMvc
  
  @Controller
  
  public class HeyThere{
  
        @RequestMapping("/welcome")
        protected ModelAndView handleRequestInternal(){
            ModelAndView modelandview = new ModelAndView("HelloPage");
  
            modelandview.addObject("welcomeMessage","Hi user, welcome to the first spring mvc application");
  
            return modelandview;
  
        }
  
  }
  </code></pre>
  
  <p><strong>Hello.jsp</strong></p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
      &lt;h1&gt;First Spring MVC Application Demo&lt;/h1&gt;
      &lt;h2&gt;${welcomeMessage}&lt;/h2&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>In the server console i'm getting below warning:</p>
  
  <pre><code>org.springframework.web.servlet.PageNotFound noHandlerFound
  
  WARNING: No mapping found for HTTP request with URI [/HereWeGo/] in DispatcherServlet with name 'spring-dispatcher'
  </code></pre>
  
  <p>My project name is HereWeGo.</p>