Search code examples
grailsgroovyurl-mapping

Grails UrlMapping 404


I have this:

static mappings = {
   "/a/b/$id/stuff"(controller: "stuff", action "action1" )
   "/a/b/$id/stuff/$stuffId"(controller: "stuff", action "action2" )
   "/a/b/$id/stuff/$stuffId/c"(controller: "stuff", action "action3" )
}

I can hit action1 and action2, but I can't hit action3, as it returns a 404.

What's going on?


Solution

  • def method(){
    
    }
    

    will not work.

    def method = {
    
    
    }
    

    WILL work.