The URL mappings fall in the order in which they are declared, so add your track /** last.
EDIT: This answer tickled my mind and I again remembered something that I read on the mailing list. Back in Grails 1.1 or so, URLMappings were evaluated in declared order. However, now URLMapping mapping is a bit more complicated. URLMappings will attempt to return the best match by comparing the number of wildcards, static tokens, and finally the number of restrictions. You can see it in the source .
Since the order of matching URLs no longer matters, it should be something else (although I believe that listing them in a rough order makes them easier to read). It seems that the second fragment should be a static marker. I would try /static/image/$imageNumber .
source share