Recently, I used Taglib to centralize the effect of URL mapping related changes of my grails application. [java] def userPageLink = {attrs, body -> def user = User.read(attrs.id) out << g.link(controller: 'user', action: 'show', params: [name: user.name]) {body()} } [/java] So wherever I need a link to user page, I...
Hi Friends, Recently I came across a problem, where the url of the links were to be generated dynamically based on the controller and action to be executed and should end with ".html". Reverse url mappings came to my rescue, which can be implemented using <g:link> GSP tag. Then I tried this, In UrlMappings.groovy file : ...
While going through the grails-users mailing list, I found a question about restricting all URLs to end with '.html' & returning Error 404 for the default mappings. After spending some time, I was able to build a sample CRUD application restricting URLs to end with .html. I did the following steps for the same: 1. Create a new...