title: URL Pattern Restricting in SPRING MVC
body: <p>My Spring Web MVC application has the following handler mapping in the Controller.</p>
  
  <pre><code>@RequestMapping(method = RequestMethod.GET, value = "/something")
  </code></pre>
  
  <p>When request is sent to </p>
  
  <blockquote>
    <p><a href="http://www.someURL.com/something" rel="nofollow noreferrer">http://www.someURL.com/something</a></p>
  </blockquote>
  
  <p>, it works fine and maps to correct controller  but,</p>
  
  <p><code>http://www.someURL.com/something.bak  or http://www.someURL.com/something.abc or http://www.someURL.com/something.abc.deff.xyz</code>  also works!!</p>
  
  <p>I want to restrict this to just <code>http://www.someURL.com/something</code> and not to others.</p>
  
  <p><code>web.xml</code> defines the mappings as :-</p>
  
  <pre><code>&lt;servlet-mapping&gt;
          &lt;servlet-name&gt;abc&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>Please suggest.</p>