title: Missing request mapping to controller. Spring MVC
body: <p>When execute request to controller, error 404 show.
  I don't understand what I did wrong.</p>
  
  <p>Below published web.xml, *-servlet.xml, controller class.</p>
  
  <p>Web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app 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_3_0.xsd"
           version="3.0" metadata-complete="false"&gt;
    &lt;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;/WEB-INF/golfing-servlet.xml&lt;/param-value&gt;
    &lt;/context-param&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;golfing&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;golfing&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/golfing/*&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
    &lt;/listener&gt;
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>Corresponding golfing-servlet.xml</p>
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"
         xmlns:mvc="http://www.springframework.org/schema/mvc" 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.xsd
          http://www.springframework.org/schema/mvc
          http://www.springframework.org/schema/mvc/spring-mvc.xsd
          http://www.springframework.org/schema/context
          http://www.springframework.org/schema/context/spring-context.xsd"&gt;
  
      &lt;mvc:default-servlet-handler/&gt;
  
      &lt;context:component-scan base-package="com.vlad.home.controllers.*" /&gt;
  
      &lt;bean id="viewResolver"
            class="org.springframework.web.servlet.view.UrlBasedViewResolver"&gt;
          &lt;property name="viewClass"
                    value="org.springframework.web.servlet.view.JstlView" /&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>And Controller class</p>
  
  <pre><code>@Controller
  @RequestMapping("/")
  public class TestController {
  
      @RequestMapping(value = "/test", method = RequestMethod.GET)
      public ModelAndView render() {
          System.out.println("WAS CALLED CONTROLLER METHOD render()");
          ModelAndView modelAndView = new ModelAndView("test");
          return modelAndView;
      }
  
      @RequestMapping(value = "/*")
      public ModelAndView others() {
          System.out.println("WAS CALLED CONTROLLER METHOD others()");
          ModelAndView modelAndView = new ModelAndView("test");
          return modelAndView;
      }
  
  }
  </code></pre>
  
  <p>Also in tomcat output console log missed mapped URL path to my controller, so it's strange.</p>
  
  <pre><code>мар 15, 2016 5:57:26 PM org.apache.catalina.startup.TldConfig execute
  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.
  мар 15, 2016 5:57:26 PM org.springframework.web.context.ContextLoader initWebApplicationContext
  INFO: Root WebApplicationContext: initialization started
  мар 15, 2016 5:57:26 PM org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
  INFO: Refreshing Root WebApplicationContext: startup date [Tue Mar 15 17:57:26 EET 2016]; root of context hierarchy
  мар 15, 2016 5:57:26 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
  INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/golfing-servlet.xml]
  мар 15, 2016 5:57:27 PM org.springframework.web.servlet.handler.SimpleUrlHandlerMapping registerHandler
  INFO: Mapped URL path [/**] onto handler 'org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0'
  мар 15, 2016 5:57:27 PM org.springframework.web.context.ContextLoader initWebApplicationContext
  INFO: Root WebApplicationContext: initialization completed in 328 ms
  мар 15, 2016 5:57:27 PM org.springframework.web.servlet.DispatcherServlet initServletBean
  INFO: FrameworkServlet 'golfing': initialization started
  мар 15, 2016 5:57:27 PM org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh
  INFO: Refreshing WebApplicationContext for namespace 'golfing-servlet': startup date [Tue Mar 15 17:57:27 EET 2016]; parent: Root WebApplicationContext
  мар 15, 2016 5:57:27 PM org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions
  INFO: Loading XML bean definitions from ServletContext resource [/WEB-INF/golfing-servlet.xml]
  мар 15, 2016 5:57:27 PM org.springframework.web.servlet.handler.SimpleUrlHandlerMapping registerHandler
  INFO: Mapped URL path [/**] onto handler 'org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler#0'
  мар 15, 2016 5:57:27 PM org.springframework.web.servlet.DispatcherServlet initServletBean
  INFO: FrameworkServlet 'golfing': initialization completed in 76 ms
  </code></pre>
  
  <p>I really don't understand where place of the mistake.</p>