title: org.springframework.web.servlet.PageNotFound noHandlerFound in eclipse
body: <p>I am trying to make this example work:
  <a href="http://www.tutorialspoint.com/spring/spring_mvc_hello_world_example.htm" rel="nofollow noreferrer">http://www.tutorialspoint.com/spring/spring_mvc_hello_world_example.htm</a></p>
  
  <p>using eclipse Version: Mars.2 Release (4.5.2), java 8, maven and tomcat 8 (inside eclipse) on ubuntu 15.10.</p>
  
  <p>My project is organized like this:</p>
  
  <pre><code>webapp (maven parent pom)
  webapp-module (maven war sub module)
  -&gt; src
    -&gt; main
      -&gt; java
        -&gt; com     
          -&gt; samples
            -&gt; HelloController.java
      -&gt; webapp
        -&gt; WEB-INF
          -&gt; jsp
            -&gt; hello.jsp
          -&gt; web.xml
          -&gt; webapp-module-servlet.xml
  </code></pre>
  
  <p>Where:</p>
  
  <p><strong>web.xml</strong></p>
  
  <pre><code>&lt;web-app id="WebApp_ID" version="2.4"
      xmlns="http://java.sun.com/xml/ns/j2ee" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
      http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"&gt;
  
      &lt;display-name&gt;Spring MVC Application&lt;/display-name&gt;
  
      &lt;context-param&gt;
         &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
         &lt;param-value&gt;/WEB-INF/webapp-module-servlet.xml&lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;listener&gt;
         &lt;listener-class&gt;
            org.springframework.web.context.ContextLoaderListener
         &lt;/listener-class&gt;
      &lt;/listener&gt;    
  
     &lt;servlet&gt;
        &lt;servlet-name&gt;webapp-module&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;webapp-module&lt;/servlet-name&gt;
        &lt;url-pattern&gt;*.jsp&lt;/url-pattern&gt;
     &lt;/servlet-mapping&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p><strong>webapp-module-servlet.xml</strong></p>
  
  <pre><code>&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;context:annotation-config/&gt;
  
     &lt;context:component-scan base-package="com.samples.*" /&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;
  </code></pre>
  
  <p></p>
  
  <p><strong>hello.jsp</strong></p>
  
  <pre><code>&lt;%@ page contentType="text/html; charset=UTF-8" %&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;Hello World&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><strong>HelloController.java</strong></p>
  
  <pre><code>package com.samples;
  
  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{
  
     @RequestMapping(method = RequestMethod.GET)
     public String printHello(ModelMap model) {
        model.addAttribute("message", "Hello Spring MVC Framework!");
  
        return "hello";
     }
  
  }
  </code></pre>
  
  <p>But when I run it inside eclipse I get:</p>
  
  <pre><code>INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
  May 01, 2016 9:35:45 PM org.apache.catalina.core.ApplicationContext log
  INFO: No Spring WebApplicationInitializer types detected on classpath
  May 01, 2016 9:35:45 PM org.apache.catalina.core.ApplicationContext log
  INFO: Initializing Spring root WebApplicationContext
  May 01, 2016 9:35:45 PM org.springframework.web.context.ContextLoader initWebApplicationContext
  INFO: Root WebApplicationContext: initialization started
  May 01, 2016 9:35:45 PM org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
  INFO: Refreshing Root WebApplicationContext: startup date [Sun May 01 21:35:45 CEST 2016]; root of context hierarchy
  May 01, 2016 9:35:45 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
  INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/webapp-module-servlet.xml]
  May 01, 2016 9:35:45 PM org.springframework.web.context.ContextLoader initWebApplicationContext
  INFO: Root WebApplicationContext: initialization completed in 657 ms
  May 01, 2016 9:35:45 PM org.apache.catalina.core.ApplicationContext log
  INFO: Initializing Spring FrameworkServlet 'webapp-module'
  May 01, 2016 9:35:45 PM org.springframework.web.servlet.DispatcherServlet initServletBean
  INFO: FrameworkServlet 'webapp-module': initialization started
  May 01, 2016 9:35:45 PM org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
  INFO: Refreshing WebApplicationContext for namespace 'webapp-module-servlet': startup date [Sun May 01 21:35:45 CEST 2016]; parent: Root WebApplicationContext
  May 01, 2016 9:35:45 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
  INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/webapp-module-servlet.xml]
  May 01, 2016 9:35:46 PM org.springframework.web.servlet.DispatcherServlet initServletBean
  INFO: FrameworkServlet 'webapp-module': initialization completed in 313 ms
  May 01, 2016 9:35:46 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["http-nio-8080"]
  May 01, 2016 9:35:46 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["ajp-nio-8009"]
  May 01, 2016 9:35:46 PM org.apache.catalina.startup.Catalina start
  INFO: Server startup in 2241 ms
  May 01, 2016 9:35:46 PM org.springframework.web.servlet.PageNotFound noHandlerFound
  WARNING: No mapping found for HTTP request with URI [/webapp-module/] in DispatcherServlet with name 'webapp-module'
  May 01, 2016 9:35:53 PM org.springframework.web.servlet.PageNotFound noHandlerFound
  WARNING: No mapping found for HTTP request with URI [/webapp-module/hello] in DispatcherServlet with name 'webapp-module'
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/QK27y.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QK27y.png" alt="enter image description here"></a></p>
  
  <p>I am using:</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;org.springframework&lt;/groupId&gt;
          &lt;artifactId&gt;spring-webmvc&lt;/artifactId&gt;
          &lt;version&gt;4.2.5.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>There a are lots of posts on the net about this recommending to add different xml oneliners here and there. I have tried most of them but still get the same error.</p>
  
  <p>Any suggestions?</p>