title: Why SpringMVC Request method 'GET' not supported?
body: <p>I trying <code>@RequestMapping(value = "/test", method = RequestMethod.POST)</code> but is error</p>
  
  <p>Code is </p>
  
  <pre><code> @Controller
   public class HelloWordController {
   private Logger logger = LoggerFactory.getLogger(HelloWordController.class);
  
   @RequestMapping(value = "/test", method = RequestMethod.POST)
   public String welcome() {
    logger.info("Spring params is welcome");
    return "/WEB-INF/jsp/welcome";
   }
  
  }
  </code></pre>
  
  <p>web.xml is</p>
  
  <pre><code>&lt;servlet&gt;
  &lt;description&gt;This is Spring MVC DispatcherServlet&lt;/description&gt;
  &lt;servlet-name&gt;SpringMVC DispatchServlet&lt;/servlet-name&gt;
  &lt;servlet-class&gt;org.springframework.web.servlet.DispatcherServlet&lt;/servlet-class&gt;
  &lt;init-param&gt;
    &lt;description&gt;SpringContext&lt;/description&gt;
    &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
    &lt;param-value&gt;classpath*:springmvc.xml&lt;/param-value&gt;
  &lt;/init-param&gt;
  &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  </code></pre>
  
  <p></p>
  
  <pre><code>  &lt;servlet-mapping&gt;
  &lt;servlet-name&gt;SpringMVC DispatchServlet&lt;/servlet-name&gt;
  &lt;url-pattern&gt;/&lt;/url-pattern&gt;
  </code></pre>
  
  <p></p>
  
  <p>and springmvc.xml is</p>
  
  <p></p>
  
  <p></p>
  
  <p> 
    
    
   </p>
  
  <p>index.jsp is</p>
  
  <pre><code>&lt;form action="&lt;%=request.getContextPath() %&gt;/test" method="post"&gt;
  &lt;input type="submit" value="submit"&gt; 
  &lt;/form&gt;
  </code></pre>
  
  <p>I input submit botton brower is error </p>
  
  <blockquote>
    <p>HTTP Status 405 - Request method 'GET'
    not supported  type Status report</p>
    
    <p>message Request method 'GET' not
    supported</p>
    
    <p>description The specified HTTP method
    is not allowed for the requested
    resource (Request method 'GET' not
    supported).</p>
  </blockquote>