By default Grails ships with the Prototype library, but through the Plug-in system provides support for other frameworks such as Dojo Yahoo UI and the Google Web Toolkit

This section covers Grails' support for Prototype. To get started you need to add this line to the <head> tag of your page:

<g:javascript library="prototype" />

This uses the javascript tag to automatically place the correct references in place for Prototype. If you require Scriptaculous too you can do the following instead:

<g:javascript library="scriptaculous" />

This works because of Grails' support for adaptive tag libraries. Thanks to Grails' plugin system there is support for a number of different Ajax libraries including (but not limited to):