title: DispatcherServlet: No mapping found for HTTP request with URI
body: <p>Running my project in STS gives on a Tomcat gives me the error: </p>
  
  <pre><code>Mai 19, 2016 4:44:52 PM org.springframework.web.servlet.PageNotFound noHandlerFound
  WARNUNG: No mapping found for HTTP request with URI [/CloudService/] in DispatcherServlet with name 'HelloWeb'
  Mai 19, 2016 4:45:35 PM org.springframework.web.servlet.PageNotFound noHandlerFound
  WARNUNG: No mapping found for HTTP request with URI [/CloudService/HelloWeb/hello] in DispatcherServlet with name 'HelloWeb'
  Mai 19, 2016 4:48:13 PM org.springframework.web.servlet.PageNotFound noHandlerFound
  WARNUNG: No mapping found for HTTP request with URI [/CloudService/] in DispatcherServlet with name 'HelloWeb'
  </code></pre>
  
  <p>I checked out nearly every relevant article on stackoverflow already, but I just cant fix my problem.</p>
  
  <p>src/main/java/HelloController.java</p>
  
  <pre><code>package com.stackoverflow;
  
  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
  @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>WebContent/WEB-INF/HelloWeb-servlet.xml</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:component-scan base-package="com.stackoverflow" /&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>WebContent/WEB-INF/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://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1"&gt;
    &lt;display-name&gt;CloudService&lt;/display-name&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;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;
  
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>WebContent/WEB-INF/jsp/hello.jsp</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>