title: Why does Spring MVC respond with a 404 and report "No mapping found for HTTP request with URI [...] in DispatcherServlet"?
body: <p>I'm writing a Spring MVC application deployed on Tomcat. See the following <a href="https://stackoverflow.com/help/mcve">minimal, complete, and verifiable example</a></p>
  <pre><code>public class Application extends AbstractAnnotationConfigDispatcherServletInitializer {
      protected Class&lt;?&gt;[] getRootConfigClasses() {
          return new Class&lt;?&gt;[] { };
      }
      protected Class&lt;?&gt;[] getServletConfigClasses() {
          return new Class&lt;?&gt;[] { SpringServletConfig.class };
      }
      protected String[] getServletMappings() {
          return new String[] { &quot;/*&quot; };
      }
  }
  </code></pre>
  <p>Where <code>SpringServletConfig</code> is</p>
  <pre><code>@Configuration
  @ComponentScan(&quot;com.example.controllers&quot;)
  @EnableWebMvc
  public class SpringServletConfig {
      @Bean
      public InternalResourceViewResolver resolver() {
          InternalResourceViewResolver vr = new InternalResourceViewResolver();
          vr.setPrefix(&quot;/WEB-INF/jsps/&quot;);
          vr.setSuffix(&quot;.jsp&quot;);
          return vr;
      }
  }
  </code></pre>
  <p>Finally, I have a <code>@Controller</code> in the package <code>com.example.controllers</code></p>
  <pre><code>@Controller
  public class ExampleController {
      @RequestMapping(path = &quot;/home&quot;, method = RequestMethod.GET)
      public String example() {
          return &quot;index&quot;;
      }
  }
  </code></pre>
  <p>My application's context name is <code>Example</code>. When I send a request to</p>
  <pre class="lang-none prettyprint-override"><code>http://localhost:8080/Example/home
  </code></pre>
  <p>the application responds with an HTTP Status 404 and logs the following</p>
  <pre class="lang-none prettyprint-override"><code>WARN  o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI `[/Example/WEB-INF/jsps/index.jsp]` in `DispatcherServlet` with name 'dispatcher'
  </code></pre>
  <p>I have a JSP resource at <code>/WEB-INF/jsps/index.jsp</code> I expected Spring MVC to use my controller to handle the request and forward to the JSP, so why is it responding with a 404?</p>
  <hr />
  <p><em>This is meant to be a canonical post for questions about this warning message.</em></p>