title: Using Spring's @RequestMapping with wildcards
body: <p>This is similar to <a href="https://stackoverflow.com/questions/5740958/how-defaultannotationhandlermapping-works">this question</a>, but I am still confused about my situation. I want to map this ant-style pattern to a controller method:</p>
  
  <pre><code>/results/**
  </code></pre>
  
  <p>That is, I want any URL like <code>www.hostname.com/MyServlet/results/123/abc/456/def/</code> to go to this method. I have:</p>
  
  <pre><code>&lt;servlet-mapping&gt;
      &lt;servlet-name&gt;MyServlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/results/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>@RequestMapping(value="/**", method=RequestMethod.GET)
  public ModelAndView handleRequest() {...}
  </code></pre>
  
  <p>This works to guide the request to my method, but leads me to several questions:</p>
  
  <ol>
  <li>What if I add another servlet mapping, like <code>&lt;url-pattern&gt;/another-mapping/*&lt;/url-pattern&gt;</code>??? It will also get mapped to that method! How can I separate the two?</li>
  <li>Why does the url-pattern <code>/results/*</code> work, whereas <code>/results/**</code> doesn't? According to ant path styles, <code>**</code> means to include nested <code>/</code> characters, whereas <code>*</code> stops at the next <code>/</code>. So, it should only successfully map a URL like <code>/results/123</code>, bot NOT <code>/results/123/abc/</code>. Right?</li>
  </ol>