accessing variable in url mapping, grails

555 views Asked by At

i am trying to access the variable defined in url mapping to be used to generate a new url.

Tried something as per this link, like:

name oldUri: "/somecontroller/$someparam"{
        controller = "newcontroller"
        action = "index"
        newURI = {
            "/data/" + params?.someparam
        }
    }

But getting NullPointer on params. Is there a ways to get someparam variable in this mapping? I am using grails 2.2.2 version

FYI: The purpose of this mapping is to redirect a user from an old URL to a new URL. and that specific issue has been resolved in 2.3 http://jira.grails.org/browse/GRAILS-5994

0

There are 0 answers