For page or any action, we need to create controller at first according to MVC pattern. We can create controller manually (click right button on controller in grails-app> controller , click new then click grails controller and give controller name and click ok) or using grails command as like
grails> create-controller site
After than you will see controller as like
package grailscrud class SiteController { def index() { } }
Here index() automatically call a view with location views/site/index. So we need to create a view named index.gsp under views/site/index and write something in this view and according to MVC pattern URL for that action will be http://localhost:8080/site/index
If you want to see this page is as default, you have to change in controller/projectname/urlMapping file as like:
static mappings = { "/$controller/$action?/$id?(.$format)?"{ constraints { // apply constraints here } } "/"(controller: 'site',action: 'index') // "/"(view:"/index") "500"(view:'/error') "404"(view:'/notFound') }