Monday, September 8, 2008

Another method for redirection in index.gsp

   In the last blog I talked about how to redirection by useing Taglib method.another simple method is config your Url maping file
grails-app/conf/UrlMappings.groovy

class UrlMappings {
    static mappings = {
        "/"(controller:"race",action:"search")   //this is your index action.
        "/$controller/$action?/$id?" {
            constraints {
                // apply constraints here
            }
        }
    }
}

No comments: