In this short howto I want to provide a brief step by step guide, on how to setup a sample Grails application and start it with the embedded GlassFish server.
#1 Download GlassFish v3 prelude from the official website (choose the distribution ,you like)
#2 Install or extract the archive to a suitable location
#3 Add your JDK/bin folder to the path variable (export with unix/linux)
#4 Start the server with <as-install>/bin/asadmin start-domain
#5 Access the admin console http://localhost:4848/
#6 Click on Update Tool, choose "Available AddOns", choose "Grails Scripting" (version 1.0.4-1.0 at the time of writing)
#7 Stop the server with <as-install>/bin/asadmin stop-domain
#8 Set/export GRAILS_HOME=<as-install>/glassfish/grails
#9 Execute GRAILS_HOME/bin/grails create-app <your_app_name>
#10 Change to the newly created directory <your_app_name>
#11 Execute GRAILS_HOME/bin/grails run-app
#12 Open your favorite browser and point it to: http://localhost:8080/<your_app_name>/
Congratulations! You are done!