开发者

How to redirect from a controller using a named URL mapping?

I have a URL mapping as below:

static mappings = {
        name register: "/register" {
            controller = "account"
            action = "createuser"
        }
}

and I want to redirect using this mapping from a controller with something like:

redirect mapping:'register'

Unfortunately, unlike createLink tag lib, it seems that redirect does not accept mapping as input parameter.

So my ques开发者_开发问答tion is : How can I use my named URL mapping for redirection ?


You can combine the two:

redirect url: createLink(mapping: 'register')
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜