title: Spring No mapping found for HTTP request with URI
body: <p>I looked at everypost related with this problem and tried nearly all of them. I'm getting this error. I also have created an empty Spring Maven MVC project and duplicated view and controller and named them as example.jsp and ExampleController.java etc. Shortly, I can not get any respond from Tomcat. I do not know it has anything to do with it but I' also getting and error at the beginning of Console log.</p>
  
  <p>Thanks in advance...</p>
  
  <p>Console log beginning warning (I do not know it has an affect on this problem):</p>
  
  <pre><code>WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:SpitterSpring' did not find a matching property.
  </code></pre>
  
  <p>Here is my actual part of error:</p>
  
  <pre><code>Tem 11, 2014 4:55:32 PM org.springframework.web.servlet.handler.SimpleUrlHandlerMapping registerHandler
  INFO: Mapped URL path [/resources/**] onto handler 'org.springframework.web.servlet.resource.ResourceHttpRequestHandler#0'
  Tem 11, 2014 4:55:32 PM org.springframework.web.servlet.DispatcherServlet initServletBean
  INFO: FrameworkServlet 'appServlet': initialization completed in 885 ms
  Tem 11, 2014 4:55:32 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["http-bio-8080"]
  Tem 11, 2014 4:55:32 PM org.apache.coyote.AbstractProtocol start
  INFO: Starting ProtocolHandler ["ajp-bio-8009"]
  Tem 11, 2014 4:55:32 PM org.apache.catalina.startup.Catalina start
  INFO: Server startup in 9260 ms
  Tem 11, 2014 4:55:34 PM org.springframework.web.servlet.PageNotFound noHandlerFound
  WARNING: No mapping found for HTTP request with URI [/spitter/] in DispatcherServlet with name 'appServlet'
  Tem 11, 2014 4:55:39 PM org.springframework.web.servlet.PageNotFound noHandlerFound
  WARNING: No mapping found for HTTP request with URI [/spitter/spitter/deneme] in DispatcherServlet with name 'appServlet'
  Tem 11, 2014 4:55:45 PM org.springframework.web.servlet.PageNotFound noHandlerFound
  WARNING: No mapping found for HTTP request with URI [/spitter/deneme] in DispatcherServlet with name 'appServlet'
  Tem 11, 2014 4:55:52 PM org.springframework.web.servlet.PageNotFound noHandlerFound
  WARNING: No mapping found for HTTP request with URI [/spitter/deneme] in DispatcherServlet with name 'appServlet'
  </code></pre>
  
  <p>Here is my web.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app version="2.5" 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_2_5.xsd"&gt;
  
      &lt;!-- The definition of the Root Spring Container shared by all Servlets 
          and Filters --&gt;
      &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;/WEB-INF/spring/application-config.xml&lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;!-- Creates the Spring Container shared by all Servlets and Filters --&gt;
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;!-- Processes application requests --&gt;
      &lt;servlet&gt;
          &lt;servlet-name&gt;appServlet&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/spring/appServlet/servlet-context.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;appServlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>Here is my servlet-context.xml file</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans:beans xmlns="http://www.springframework.org/schema/mvc"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:beans="http://www.springframework.org/schema/beans"
      xmlns:context="http://www.springframework.org/schema/context"
      xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
          http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd"&gt;
  
      &lt;!-- DispatcherServlet Context: defines this servlet's request-processing infrastructure --&gt;
  
      &lt;!-- Enables the Spring MVC @Controller programming model --&gt;
      &lt;annotation-driven /&gt;
  
      &lt;context:component-scan base-package="com.ex.spitter.mvc" /&gt;
  
      &lt;!-- Handles HTTP GET requests for /resources/** by efficiently serving up static resources in the ${webappRoot}/resources directory --&gt;
      &lt;resources mapping="/resources/**" location="/resources/" /&gt;
  
      &lt;!-- Resolves views selected for rendering by @Controllers to .jsp resources in the /WEB-INF/views directory --&gt;
      &lt;beans:bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"&gt;
          &lt;beans:property name="prefix" value="/WEB-INF/views/" /&gt;
          &lt;beans:property name="suffix" value=".jsp" /&gt;
      &lt;/beans:bean&gt;
  
  
  &lt;/beans:beans&gt;
  </code></pre>
  
  <p>Here is my com.ex.spitter.mvc -> HomeController:</p>
  
  <pre><code>package com.ex.spitter.mvc;
  
  import java.util.Map;
  
  import javax.inject.Inject;
  
  import org.springframework.stereotype.Controller;
  import org.springframework.web.bind.annotation.RequestMapping;
  import org.springframework.web.bind.annotation.RequestMethod;
  
  import com.ex.spitter.service.SpitterService;
  
  @Controller
  public class HomeController {
  
      private SpitterService spitterService;
  
      @Inject
      public HomeController(SpitterService spitterService) {
          this.spitterService = spitterService;
      }
  
      @RequestMapping(value = { "/", "/home" }, method = RequestMethod.GET)
      public String showHomePage(Map&lt;String, Object&gt; model) {
          model.put("spittles", spitterService.getRecentSpittles(spittlesPerPage));
          return "home";
      }
  
      // &lt;start id="spittlesPerPage"/&gt;
      public static final int DEFAULT_SPITTLES_PER_PAGE = 25;
  
      private int spittlesPerPage = DEFAULT_SPITTLES_PER_PAGE;
  
      public void setSpittlesPerPage(int spittlesPerPage) {
          this.spittlesPerPage = spittlesPerPage;
      }
  
      public int getSpittlesPerPage() {
          return spittlesPerPage;
      }
      // &lt;end id="spittlesPerPage"/&gt;
  }
  </code></pre>