Sun GlassFish Enterprise Server v3 Prelude Developer's Guide

ProcedureCreating the hello Controller

  1. Go to the as-install/grails/samples/helloworld directory.

  2. Run the grails create-controller hello command.

    The grails create-controller command creates a controller file that you can modify.

  3. Edit the generated HelloController.groovy file so it looks like this:

    class HelloController {
    
           def world = {
                    render "Hello World!"
            }
        //def index = { }
    }