title: Spring MVC wildcard
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/3686808/spring-3-requestmapping-get-path-value">Spring 3 RequestMapping: Get path value</a>  </p>
  </blockquote>
  
  
  
  <p>Does anyone knows how to map everything under a certain URL and then catch that mapped value into a request variable?</p>
  
  <pre><code>@RequestMapping("/content/{path:.*}") // matches only one level
  @RequestMapping("/content/**")        // matches everything, can't catch
                                        // the actual value matched by the two stars
  @RequestMapping("/content/{path:**}") // does not compute
  </code></pre>
  
  <p>What I need to map is:</p>
  
  <pre><code>/content/a.gif
  /content/a/b.gif
  /content/a/b/c.gif
  /content/a/b/c/d.gif
  </code></pre>
  
  <p>It's really frustrating because it is such a common scenario.</p>