Route precedence

The order of route declaration is important as it affects how rules are matched. Sometimes, the same request could be matched by several routes and the routing table is ambiguous.

<route path="/foo">
  <route-param qname="gtn:handler">
<route path="/{gtn:path}">
  <path-param encoding="preserve-path" qname="gtn:path">

In that case, the request path "/foo" will always be matched by the first rule before the second rule. This can be misleading since the map (gtn:path=foo) would be rendered as "/foo" and would not be matched by the first rule. Such ambiguity can happen, it can be desirable or not.

Copyright ©. All rights reserved. eXo Platform SAS
blog comments powered byDisqus