title: Getting "405 - Request method 'GET' not supported when calling" method=DELETE
body: <p>I have a Spring MVC web app. In it a form with a button that's supposed to delete a resource from another resource:</p>
  
  <pre><code>&lt;td&gt;
      &lt;form action="/product-bases/${productBase.id}/positions/${position.id}" method="DELETE"&gt;
          &lt;input type="submit" value="delete" /&gt;
      &lt;/form&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p>My controller:</p>
  
  <pre><code>@Controller
  @RequestMapping(value = "/product-bases/{id}/positions")
  public class ProductBasePositionController {
  
      @RequestMapping(value = "/{positionId}", method = RequestMethod.DELETE)
      public ModelAndView delete(@PathVariable Integer productBaseId, @PathVariable Integer positionId) {
  </code></pre>
  
  <p>So in theory the server should route to the controller. But alas it does not, hence the post ;)</p>
  
  <p>I'm getting </p>
  
  <pre><code>HTTP Status 405 - Request method 'GET' not supported
  
  type Status report
  
  message Request method 'GET' not supported
  
  description The specified HTTP method is not allowed for the requested resource (Request method 'GET' not supported).
  Apache Tomcat/7.0.19
  </code></pre>
  
  <p>Obviously I don't have a get for /positions/id defined yet, but why should I, I want to do a delete for now..</p>
  
  <p>(I'm also trying to run this from my spring-test-mvc framework on a mock servlet without any tomcat implementation in between and it gives me a 400 - bad request..
  )</p>
  
  <p>So what am I missing here?</p>
  
  <p>Oh, just to cut some corners: post and get will work for other resources, so the rest of my setup is fine.</p>
  
  <p>The booting server even tells me:</p>
  
  <pre><code>RequestMappingHandlerMapping [INFO] Mapped "{[/product-bases/{id}/positions/{positionId}],methods=[DELETE],params=[],headers=[],consumes=[],produces=[],custom=[]}" onto public org.springframework.web.servlet.ModelAndView our.view.controller.ProductBasePositionController.delete(java.lang.Integer,java.lang.Integer)
  </code></pre>
  
  <p>Anyone as confused as I am? If less so, please enlighten me!</p>