I have a Controller action and sending a mail in it with something like:
mailService.sendMail {
...
g.render(template: "mailtemplate")
}
in this template file is called _mailtemplate.gsp I use
<a href="<g:createLink controller="servicecontroller" action="confirm"/>">linktext</a>
But the output is http://action … that’s it! I would expect to have http://www.example.com/action. If I use the same createLink tag in a gsp which is not a template it’s working (by the way, email is working fine and all the other stuff in this template is rendered well).
Have you any suggestions on that?
Probably you need absolute link:
Btw, you can also use
${}syntax there, like: