Reputation: 49
I made a copy of index.gsp, called index_1.gsp and I like to call from an html page.
Since I did know how to call it from an html page I tried to call the index_1.gsp from a controller using the command: redirect(uri: "/index_1.gsp"), but failed.
I will appreciate it if you help me to call it either from html page or from a controller. Thanks
Upvotes: 0
Views: 440
Reputation: 27255
You cannot call a GSP from an HTML page. It doesn't make sense.
If you want to render the view from a controller you can do something like this...
class SomeController {
def someAction() {
// this will render grails-app/views/some/index_1.gsp
render view: 'index_1'
}
}
Upvotes: 1