I have the following UrlMapping in my Grails UrlMappings class:
"/$something/" {
controller = "controllerName"
action = "actionName"
constraints {
}
}
Requests of both "/ foobar /" and "/ foobar" are routed to the correct controller and action.
However, the URL: s created using g: link does not end with a slash ("/") as expected.
GSP Code ...
<g:link controller="controllerName" action="actionName" params="[something: 'foobar']">...</g:link>
... generates HTML output ...
<a href="/foobar">...</a>
How to get Grails to create the link specified in the URL pattern? This includes the trailing slash.
knorv source
share