Grails aims to bring the "coding by convention" paradigm to Groovy.
It's an open-source web application framework that leverages the Groovy language and
complements Java Web development. You can use Grails as a standalone development environment that
hides all configuration details or integrate your Java business logic.
Grails aims to make development as simple as possible and hence should appeal to a wide range of
developers not just those from the Java community.
GlassFish Support For Grails adds Grails framework to GlassFish application server and allows development and easy deployment of Grails applications. Applications can be deployed in shared or standalone mode. Shared mode allows library reuse and results in much smaller war files. It also provides run-app-gf command to develope the grails applications using GlassFish. This module contains Grails binary distribution, and additional scripts and modules. |
To get started follow these steps:
> set GRAILS_HOME=C:\GlassFish\modules\grails > set PATH=%GRAILS_HOME%\bin;%PATH% (optional - for "shared libraries" setup) > cd %GRAILS_HOME% > ant installOn a Unix-like computer these steps are done as follows: > set GRAILS_HOME=~/glassfish/modules/grails > export GRAILS_HOME > cd $GRAILS_HOME > set PATH=$GRAILS_HOME/bin:$PATH > export PATH > chmod a+x $GRAILS_HOME/bin/* (optional - for "shared libraries" setup) > cd $GRAILS_HOME > ant installYou can now run the grails command: > grails create-app YourProjectFor more info look at the support links below. |
Grails GlassFish bundle comes with run-app-gf command. To run your grails application all you need to do is
cd grails/samples/BookLibrary
grails run-app-gf
Grails recommends creating a war file using grails war command to package your application for production uses and
testing. The GlassFish grails bundle provides grails shared-war command in addition to grails-war.
shared-ward command won't package all the grails dependency in a single war file, instead you can run
ant install
to install the grails libraries on GlassFish v3 (described in the Install and Setup
section and save system resources arising from all-in-one war file.
|
![]() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() |