title: Servlets with overlapping pattern
body: <p>I need to implement 3 servlets, with pattern overlapping.</p>
  
  <p><strong>The first</strong> servlet would handle for example:</p>
  
  <pre><code>/context/categories
  </code></pre>
  
  <p>with a pattern like this:</p>
  
  <pre><code>@WebServlet("/categories"))
  </code></pre>
  
  <p><strong>The second</strong> servlet would handle for example:</p>
  
  <pre><code>/context/categories/category1/
  </code></pre>
  
  <p>with a pattern like this:</p>
  
  <pre><code>@WebServlet("/categories/*")
  </code></pre>
  
  <p><strong>And the third</strong> would be like:</p>
  
  <pre><code>/context/categories/category1/category1contentname
  </code></pre>
  
  <p>But i cant give the proper pattern to the third, because the second servlet will catch the call, or neither will.
  My question is, how can i give the correct patterns to the servlets, especially the second and the third?
  I know the /* suffix, and the *. prefix, but it doesnt seem to work properly so far.</p>