I have the following UrlMapping in my Grails UrlMappings class:
"/$something/" {
controller = "controllerName"
action = "actionName"
constraints {
}
}
Requests to both "/foobar/" and "/foobar" gets routed to the correct controller and action.
However, URL:s created using g:link does not end with slash ("/") as expected.
The GSP code ...
<g:link controller="controllerName" action="actionName" params="[something: 'foobar']">...</g:link>
... generates the HTML output ...
<a href="/foobar">...</a>
How do I make Grails generate the link as specified by the URL pattern? That is including the ending slash.