title: Restlet routing nightmare?
body: <p>Okay this is ridiculous: (or probably my design is :)</p>
  
  <p>Here are the URLs that we are using:</p>
  
  <pre><code>
  /{projectName}/{wallName}        - GET only: fetch all win conditions posted to the all
  /{projectName}/WinCondition      - POST a new Win Condition
  /{projectName}/WinCondition/{id} - GET, PUT & DELETE
  </code></pre>
  
  <p>Now the funny part:</p>
  
  <p>If the code is ordered as above the call <code>POST: /myProject/WinCondition</code> gets routed to the first route with wallName! And thus get a 405.</p>
  
  <p>If I shift the <code>/{projectName}/{wallName}</code> to the bottom then it gets routed correctly!</p>
  
  <p>Now here's what I know:</p>
  
  <ul>
  <li>The default routing mode in Restlet
  is MODE_FIRST_MATCH. I set that to
  MODE_BEST_MATCH and the order of URLs
  still matters! I am unable to access
  the 'affinity' score to check what's
  the problem/score. Matching mode is Template.MODE_EQUALS.</li>
  </ul>
  
  <p>The question is then this: Do I have to be concerned with how I order the URLs in my java file???? That'll be scary, even from a maintenance point of view.</p>
  
  <p>Any suggestions? Should I redesign my URLs?? But the 'structure' still tends to be the same leading to the same problem</p>